• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

database name with underscores

Z

zacpac

Guest
Has anyone found a fix for the problem with database names with _'s in them as i just migrated a plesk 5 box and everything went really well until i found this problem !


thanks

dan
 
Is this just a migration issue? We have some databases in 7.5 with _'s and have no problems with those.
 
could it be a mysql 4 problem ??

i create a database such as this_is_test and give it a username and a password and then i try and use plesk's phpmyadmin

i get the following error

1227 - Access denied. You need the SHOW DATABASES privilege for this operation

i get this error on both a 7.5.1 box and a 7.5.2 box bothing using mysql 4.0.23a.ART
 
just check have added 2 new databases one with _ in the name and one without i can use phpmyadmin on the one with out and i get the error above on the one with
 
right i have worked out the problem just to implement the answer

basically plesk stored the db name in the mysql.db tables with \_ in the name rather than the name and when the db name is being passed to phpmyadmin it doesnt have the \ in it and therefore it can not find the privilges to allow you to access it

this is why it doesnt affect db names without _ in them
 
hurrah now its fixed :)

just add a nice line to the config.inc.php of the plesk version of phpmyadmin

$db_name = str_replace("_","\_", $db_name);

and all is now good in the world again
 
We had problems with mysql 4, in fact, in our migration from 7.1 to 7.5, we had problems with mysql 3 and 4 but after upgrading to 4 then back down to 3, we haven't had any other issues. So i'm not sure if this is a mysql version issue for you or not but it's possible.
 
yeah i really want to keep mysql4 as some customers are using some of the functions from it already :-(

i have opened a ticket with plesk and they seem to be looking into it wether anything happens is another thing but they seem keen to find the cause
 
Back
Top