wills

Well-Known Member
Jan 29, 2003
202
1
168
Is there a way to change the name of the mySQL databases in the back-end? I have a customer that wants to do this so that its not like USER_DATABASENAME format, I guess he is in transition of moving over the site and his scripts are all pointing to his old database name which is just a simple DATABASE name.

cPanel.net Support Ticket Number:
 

NetX

Well-Known Member
Jun 18, 2003
177
0
166
You can export all tables of DATABASE, after, create a db user_databasename and import your tables.

cPanel.net Support Ticket Number:
 

wills

Well-Known Member
Jan 29, 2003
202
1
168
I think I might have explained it incorrectly. I'm wondering if there is a way to remove the account ID (USERNAME_DATABASE) from the SQL databases name(s)?

Same with the username for the databases. Sorry, this is one of those really odd questions that never comes up. In my opinion its uneccessary to change this but I want to accomodate the customer's needs :)

cPanel.net Support Ticket Number:
 

NetX

Well-Known Member
Jun 18, 2003
177
0
166
Ok wills. Yes, it is possible use a different name of database for a user; you will have to do it manually.

1) Access phpmyadmin as root.
2) Create the database that you want in format DATABASENAME without any ID.
3) Import tables
4) Then you have to add privileges to respective user in order to access DATABASENAME.
5) Reload mysql

And all will be done. ;)

cPanel.net Support Ticket Number:
 
Last edited:

mjm

BANNED
Aug 1, 2003
69
0
156
rename database should be implemented in mySQL 5.1

cPanel.net Support Ticket Number:
 

wills

Well-Known Member
Jan 29, 2003
202
1
168
to run phpmyadmin as root, which variable do I need to configure in config.inc.php? I hate not knowing :(

And its good to know that this will be possible in 5.1!

NetX, thanks for the input, its very classy of you to show me how to do this!

cPanel.net Support Ticket Number:
 

NetX

Well-Known Member
Jun 18, 2003
177
0
166
wills, in your config.inc.php3 file just setup cookie based and left blank user and password:

$cfg['Servers'][$i]['auth_type'] = 'cookie'; // Authentication method (config, http or cookie based)?
$cfg['Servers'][$i]['user'] = ''; // MySQL user
$cfg['Servers'][$i]['password'] = ''; // MySQL password (only needed

Good look! ;)

cPanel.net Support Ticket Number:
 

wills

Well-Known Member
Jan 29, 2003
202
1
168
got it, I guess the restart had failed through WHM so I had to do it through SSH.

One more question, if I do this then there is no way to control the quota on the database disk limit, is there?

cPanel.net Support Ticket Number:
 

NetX

Well-Known Member
Jun 18, 2003
177
0
166
Ho, in this way the database is not considering for quota.

cPanel.net Support Ticket Number: