please tell the use of some function in db-config.php
WPMU DEV Community
please tell the use of some function in db-config.php
Inactive
27 pointsStarting to get into this DEV thingI'm new here
cagora
Member
—
5th September 2009 (2 years ago)
Houston, we have a problem!
Looks like you need to create your new db's! If you're lucky, this link still works - click me
Database Error: Access denied for user 'cagorabi_wpmu'@'localhost' to database 'newdbnamec'
Houston, we have a problem!
Looks like you need to create your new db's! If you're lucky, this link still works - click me
Database Error: Access denied for user 'cagorabi_wpmu'@'localhost' to database 'newdbnamec'
6593 pointsLike some sort of WPMU DEV GodExceptionally helpfulLifetime member
Keeper of the Dark Chocolate
—
5th September 2009 (2 years ago)
#
Please do us a favor and only post *once* on a specific topic. I'm going to leave it at that as I've been up since 3am this morning helping to feed over 400 homeless and seeing that doesn't make me that happy. I'm just a peon here but I do my best to help out as well.
Now then:
Please walk us through with specifics as to what you've done to install these files.
Have you read the read file inlcuded with the download?
Have you created the databases? Are the names of the db's the same as what you have in the lines you copied?
Do you really have a database with the name wp_something?
What you have up there looks fine so far although I wouldn't be worrying about a vip blog until you need it. (ie like 50 million hits a day and it being on it's own server) Let's first get the multidb installed and then worry about the extras.
thanks for your reply but i m still did'nt find the right way to install the plugin here is the specification which i did with the files till now.please tell me the step by step procedure to do it
1. I have created database with name something on the server
2. I have checked the database names which i created on the server and paste here
3. I have put the files at the right places as written in the read file attached with the folder.
I understand. I figured that it was coming from move-blogs.php
However I have replaced it and this is how the file looks now
///DB Settings
$dbname = "cagorabi_wpmu"; //This is your current database
$blog_table_prefix = 'wp_'; //Prefix of your wpmu blog tables, most likely this won't need to be changed
$newdb_prefix = 'cagorabi'; //This is the prefix of the db's you're moving your tables into - we assume they are all the same, if not, you're in trouble
//We need info to connect to the databases
$dbhost = 'localhost';
$dbuname = 'cagorabi_cogorab';
$dbpass = 'wpmu';
//How many db's are you moving into (16, 256, or 4096)?
$db_scaling = '16';
Still confused whats messed up!
Database Error: Access denied for user 'cagorabi_wpmu'@'localhost' to database 'newdbnamec'
Now when I try to run the move-blogs script it gives me this error.
Houston, we have a problem!
Looks like you need to create your new db's! If you're lucky, this link still works - click me
Database Error: Access denied for user 'cagorabi_wpmu'@'localhost' to database 'cagorabi_c'
Here is the config inside move-blog.php
///DB Settings
$dbname = "cagorabi_wpmu"; //This is your current database
$blog_table_prefix = 'wp_'; //Prefix of your wpmu blog tables, most likely this won't need to be changed
$newdb_prefix = 'cagorabi_'; //This is the prefix of the db's you're moving your tables into - we assume they are all the same, if not, you're in trouble
//We need info to connect to the databases
$dbhost = 'localhost';
$dbuname = 'cagorabi_wpmu';
$dbpass = 'wpmu';
//How many db's are you moving into (16, 256, or 4096)?
$db_scaling = '16';
I think its something to do with md5 hash!!! Can you help me with that?
I have the global database in place
add_db_server('global', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_wpmu', 'cagorabi_wpmu', 'wpmu');
also i have added this line at the bottom
add_vip_blog(1, 'global');
I manually created the databases and assigned the same user to all 16 databases (screenshot attached)
I get this error when i activate the plugin.
Looks like you need to create your new db's! If you're lucky, this link still works - click me
Database Error: Access denied for user 'cagorabi_wpmu'@'localhost' to database 'cagorabi_c'
Above:: If the database name would have been cagorabi_wpmu0' or cagorabi_wpomu1' it would have worked.
7430 pointsLike some sort of WPMU DEV GodMindblowingly helpful memberLifetime member
Erstwhile founder
—
7th September 2009 (2 years ago)
#
Hiya,
Looks like you need to create your new db's! If you're lucky, this link still works - click me
Database Error: Access denied for user 'cagorabi_wpmu'@'localhost' to database 'cagorabi_c'
You're getting those errors because you have the databases configured like this:
7430 pointsLike some sort of WPMU DEV GodMindblowingly helpful memberLifetime member
Erstwhile founder
—
7th September 2009 (2 years ago)
#
Access denied for user 'cagorabi_wpmu'@'localhost' to database 'cagorabi_c'
and if this is corrected then it will work. Please advise
Please see my post above. You don't have any databases named like 'cagorabi_c' so I'm not sure why you have those databases configured in db-config.php. You need to configure the databases based on the actual names of the databases.
one more thing. As per installation instructions. I have copied move-blogs.php in scripts folder inside wp-content folder. However when I do that I do not see the plugin name in the list of plugins.
However when I move the file to plugins folder then the plugin shows up in the list. Where should I place the file?
I will be grateful if we can get it sorted today, as I am desperate to launch the blog.
This is the error I am getting
Looks like you need to create your new db's! If you're lucky, this link still works - click me
Database Error: Access denied for user 'cagorabi_wpmu'@'localhost' to database 'cagorabi_c'
7430 pointsLike some sort of WPMU DEV GodMindblowingly helpful memberLifetime member
Erstwhile founder
—
7th September 2009 (2 years ago)
#
This is the error I am getting
Looks like you need to create your new db's! If you're lucky, this link still works - click me
Database Error: Access denied for user 'cagorabi_wpmu'@'localhost' to database 'cagorabi_c'
Did you change the db prefix in move-blogs.php?
one more thing. As per installation instructions. I have copied move-blogs.php in scripts folder inside wp-content folder. However when I do that I do not see the plugin name in the list of plugins.
It's not a plugin. Please place the file where the instructions tell you to.
I will be grateful if we can get it sorted today, as I am desperate to launch the blog.
I'm afraid it's a national holiday in the US (where I'm located) so this will be my last reply for today.
You may want to consider hiring someone to assist you with installing this.
I placed the files as per installation instructions.
I have already placed the db prefix in move-blogs.php, this is how it looks
$dbname = "cagorabi_wpmu"; //This is your current database
$blog_table_prefix = 'wp_'; //Prefix of your wpmu blog tables, most likely this won't need to be changed
$newdb_prefix = 'cagorabi_'; //This is the prefix of the db's you're moving your tables into - we assume they are all the same, if not, you're in trouble
//We need info to connect to the databases
$dbhost = 'localhost';
$dbuname = 'cagorabi_wpmu';
$dbpass = 'wpmu';
I guess then I am all set. Does it work automatically?
that c is coming back all the time, no matter what I change, the access is denied to a database that ends on a c or _c. I walked through the various tutorials on this forum multiple times, verified it with my webhost, they say it's a bug in the script. The error with the c is coming back. Don't know what to do anymore.
7430 pointsLike some sort of WPMU DEV GodMindblowingly helpful memberLifetime member
Erstwhile founder
—
8th September 2009 (2 years ago)
#
Hi Guys,
There's not an issue with Multi-DB that causes that problem. A bad configuration causes that problem.
Multi-DB only attempts to connect to databases you've specified. So if it's trying to connect to a db that doesn't exist then there's a problem in your configuration. Take a close look at the example config files or post your config file here. Mask passwords and only post a sample of the connection lines if you're using 256 or 4096 databases.
Responses (27)
Keeper of the Dark Chocolate — 5th September 2009 (2 years ago) #
Please do us a favor and only post *once* on a specific topic. I'm going to leave it at that as I've been up since 3am this morning helping to feed over 400 homeless and seeing that doesn't make me that happy. I'm just a peon here but I do my best to help out as well.
Now then:
Please walk us through with specifics as to what you've done to install these files.
Have you read the read file inlcuded with the download?
Have you created the databases? Are the names of the db's the same as what you have in the lines you copied?
Do you really have a database with the name wp_something?
What you have up there looks fine so far although I wouldn't be worrying about a vip blog until you need it. (ie like 50 million hits a day and it being on it's own server) Let's first get the multidb installed and then worry about the extras.
Erstwhile founder — 5th September 2009 (2 years ago) #
Hiya,
I have to agree with what drmike said regarding the duplicate posts. I think I counted two other posts. That's just a little much.
Let's try to keep everything in one thread so it's easier to reply and generally keep track of things.
Let's switch that out with the public IP.
Thanks,
Andrew
Keeper of the Dark Chocolate — 5th September 2009 (2 years ago) #
I was looking at that as well but didn't know if this was a public server or a testbed.
Member — 7th September 2009 (2 years ago) #
thanks for your reply but i m still did'nt find the right way to install the plugin here is the specification which i did with the files till now.please tell me the step by step procedure to do it
1. I have created database with name something on the server
2. I have checked the database names which i created on the server and paste here
3. I have put the files at the right places as written in the read file attached with the folder.
help from anyone will appreciated
thanks and regards
Member — 7th September 2009 (2 years ago) #
Andrew,
I changed the IP to public IP (of my server)
Now when I activate the plugin I get the error message
Database Error: Access denied for user 'cagorabi_wpmu'@'localhost' to database 'newdbnamec'
I am not sure where from the script is calling 'newdbnamec' - this database?
Developer — 7th September 2009 (2 years ago) #
Do you have it listed in the standard db configuration in wp-config.php?
Member — 7th September 2009 (2 years ago) #
Hello cafespain.
Thanks for your reply. My wp-config.php does not have thi8s databse name
It uses
define('DB_NAME', 'cagorabi_wpmu');
/** MySQL database username */
define('DB_USER', 'cagorabi_wpmu');
/** MySQL database password */
define('DB_PASSWORD', 'wpmu');
/** MySQL hostname */
define('DB_HOST', 'localhost');
I searched all over the database, the php files and I was not able to find any reference to newdbnamec. Any help is appreciated.
Developer — 7th September 2009 (2 years ago) #
It's got to be in there somewhere as the system just can't make them up :)
Member — 7th September 2009 (2 years ago) #
I understand. I figured that it was coming from move-blogs.php
However I have replaced it and this is how the file looks now
///DB Settings
$dbname = "cagorabi_wpmu"; //This is your current database
$blog_table_prefix = 'wp_'; //Prefix of your wpmu blog tables, most likely this won't need to be changed
$newdb_prefix = 'cagorabi'; //This is the prefix of the db's you're moving your tables into - we assume they are all the same, if not, you're in trouble
//We need info to connect to the databases
$dbhost = 'localhost';
$dbuname = 'cagorabi_cogorab';
$dbpass = 'wpmu';
//How many db's are you moving into (16, 256, or 4096)?
$db_scaling = '16';
Still confused whats messed up!
Database Error: Access denied for user 'cagorabi_wpmu'@'localhost' to database 'newdbnamec'
Erstwhile founder — 7th September 2009 (2 years ago) #
Hiya,
I'm afraid I'm just going to have say the same thing cafespain said. That db name has to be set somewhere.
Btw, are you getting this error on a WPMU page or when trying to run the move-blogs script?
Thanks,
Andrew
Member — 7th September 2009 (2 years ago) #
Now when I try to run the move-blogs script it gives me this error.
Houston, we have a problem!
Looks like you need to create your new db's! If you're lucky, this link still works - click me
Database Error: Access denied for user 'cagorabi_wpmu'@'localhost' to database 'cagorabi_c'
Here is the config inside move-blog.php
///DB Settings
$dbname = "cagorabi_wpmu"; //This is your current database
$blog_table_prefix = 'wp_'; //Prefix of your wpmu blog tables, most likely this won't need to be changed
$newdb_prefix = 'cagorabi_'; //This is the prefix of the db's you're moving your tables into - we assume they are all the same, if not, you're in trouble
//We need info to connect to the databases
$dbhost = 'localhost';
$dbuname = 'cagorabi_wpmu';
$dbpass = 'wpmu';
//How many db's are you moving into (16, 256, or 4096)?
$db_scaling = '16';
I think its something to do with md5 hash!!! Can you help me with that?
Member — 7th September 2009 (2 years ago) #
BTW I have these already created
add_db_server('0', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_0', 'cagorabi_wpmu', 'wpmu');
add_db_server('1', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_1', 'cagorabi_wpmu', 'wpmu');
add_db_server('2', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_2', 'cagorabi_wpmu', 'wpmu');
add_db_server('3', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_3', 'cagorabi_wpmu', 'wpmu');
add_db_server('4', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_4', 'cagorabi_wpmu', 'wpmu');
add_db_server('5', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_5', 'cagorabi_wpmu', 'wpmu');
add_db_server('6', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_6', 'cagorabi_wpmu', 'wpmu');
add_db_server('7', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_7', 'cagorabi_wpmu', 'wpmu');
add_db_server('8', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_8', 'cagorabi_wpmu', 'wpmu');
add_db_server('9', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_9', 'cagorabi_wpmu', 'wpmu');
add_db_server('a', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_a', 'cagorabi_wpmu', 'wpmu');
add_db_server('b', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_b', 'cagorabi_wpmu', 'wpmu');
add_db_server('c', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_c', 'cagorabi_wpmu', 'wpmu');
add_db_server('d', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_d', 'cagorabi_wpmu', 'wpmu');
add_db_server('e', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_e', 'cagorabi_wpmu', 'wpmu');
add_db_server('f', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_f', 'cagorabi_wpmu', 'wpmu');
Erstwhile founder — 7th September 2009 (2 years ago) #
Hiya,
Did you manually create the databases? Also, you're missing your global db: cagorabi_global
Thanks,
Andrew
Member — 7th September 2009 (2 years ago) #
I have the global database in place
add_db_server('global', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_wpmu', 'cagorabi_wpmu', 'wpmu');
also i have added this line at the bottom
add_vip_blog(1, 'global');
I manually created the databases and assigned the same user to all 16 databases (screenshot attached)
I get this error when i activate the plugin.
Looks like you need to create your new db's! If you're lucky, this link still works - click me
Database Error: Access denied for user 'cagorabi_wpmu'@'localhost' to database 'cagorabi_c'
Above:: If the database name would have been cagorabi_wpmu0' or cagorabi_wpomu1' it would have worked.
Please help!!!
Erstwhile founder — 7th September 2009 (2 years ago) #
Hiya,
You're getting those errors because you have the databases configured like this:
add_db_server('0', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_0', 'cagorabi_wpmu', 'wpmu');
add_db_server('1', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_1', 'cagorabi_wpmu', 'wpmu');
When you should have them configured like this:
add_db_server('0', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_wpmu0', 'cagorabi_wpmu', 'wpmu');
add_db_server('1', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_wpmu1', 'cagorabi_wpmu', 'wpmu');
As mentioned above, let's not use the VIP db right now. That's really not a proper way of using it anyway. Comment out that line.
Thanks,
Andrew
Developer — 7th September 2009 (2 years ago) #
Can you go into the SQL tab on phpMyAdmin and type in:
FLUSH PRIVILEGES;
and run it. Then try again (just to be sure that the permissions and users are set up properly).
Member — 7th September 2009 (2 years ago) #
I tried it and it said.
#1227 - Access denied; you need the RELOAD privilege for this operation
However I assume that it is a matter of database name being wrong... the script is calling the wrong DB
Access denied for user 'cagorabi_wpmu'@'localhost' to database 'cagorabi_c'
and if this is corrected then it will work. Please advise
Erstwhile founder — 7th September 2009 (2 years ago) #
Please see my post above. You don't have any databases named like 'cagorabi_c' so I'm not sure why you have those databases configured in db-config.php. You need to configure the databases based on the actual names of the databases.
Thanks,
Andrew
Member — 7th September 2009 (2 years ago) #
I already found that and corrected the db-config.php
now it has this
add_db_server('0', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_wpmu0', 'cagorabi_wpmu', 'wpmu');
add_db_server('1', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_wpmu1', 'cagorabi_wpmu', 'wpmu');
add_db_server('2', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_wpmu2', 'cagorabi_wpmu', 'wpmu');
add_db_server('3', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_wpmu3', 'cagorabi_wpmu', 'wpmu');
add_db_server('4', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_wpmu4', 'cagorabi_wpmu', 'wpmu');
add_db_server('5', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_wpmu5', 'cagorabi_wpmu', 'wpmu');
add_db_server('6', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_wpmu6', 'cagorabi_wpmu', 'wpmu');
add_db_server('7', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_wpmu7', 'cagorabi_wpmu', 'wpmu');
add_db_server('8', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_wpmu8', 'cagorabi_wpmu', 'wpmu');
add_db_server('9', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_wpmu9', 'cagorabi_wpmu', 'wpmu');
add_db_server('a', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_wpmua', 'cagorabi_wpmu', 'wpmu');
add_db_server('b', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_wpmub', 'cagorabi_wpmu', 'wpmu');
add_db_server('c', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_wpmuc', 'cagorabi_wpmu', 'wpmu');
add_db_server('d', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_wpmud', 'cagorabi_wpmu', 'wpmu');
add_db_server('e', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_wpmue', 'cagorabi_wpmu', 'wpmu');
add_db_server('f', 'dc1', 1, 1,'locahost','localhost', 'cagorabi_wpmuf', 'cagorabi_wpmu', 'wpmu');
Still I get the error when I try to activate the plugin
Member — 7th September 2009 (2 years ago) #
Andrew
Any help will be appreciated.
Thanks
Member — 7th September 2009 (2 years ago) #
one more thing. As per installation instructions. I have copied move-blogs.php in scripts folder inside wp-content folder. However when I do that I do not see the plugin name in the list of plugins.
However when I move the file to plugins folder then the plugin shows up in the list. Where should I place the file?
I will be grateful if we can get it sorted today, as I am desperate to launch the blog.
Thanks
Member — 7th September 2009 (2 years ago) #
This is the error I am getting
Looks like you need to create your new db's! If you're lucky, this link still works - click me
Database Error: Access denied for user 'cagorabi_wpmu'@'localhost' to database 'cagorabi_c'
Erstwhile founder — 7th September 2009 (2 years ago) #
Did you change the db prefix in move-blogs.php?
It's not a plugin. Please place the file where the instructions tell you to.
I'm afraid it's a national holiday in the US (where I'm located) so this will be my last reply for today.
You may want to consider hiring someone to assist you with installing this.
Thanks,
Andrew
Member — 8th September 2009 (2 years ago) #
Andrew,
I placed the files as per installation instructions.
I have already placed the db prefix in move-blogs.php, this is how it looks
$dbname = "cagorabi_wpmu"; //This is your current database
$blog_table_prefix = 'wp_'; //Prefix of your wpmu blog tables, most likely this won't need to be changed
$newdb_prefix = 'cagorabi_'; //This is the prefix of the db's you're moving your tables into - we assume they are all the same, if not, you're in trouble
//We need info to connect to the databases
$dbhost = 'localhost';
$dbuname = 'cagorabi_wpmu';
$dbpass = 'wpmu';
I guess then I am all set. Does it work automatically?
Erstwhile founder — 8th September 2009 (2 years ago) #
Let's change that to:
$newdb_prefix = 'cagorabi_wpmu';
Prefix = anything prior to the md5 hash characters. 0-9/a-f for 16 databases.
You have to run the move-blogs.php script. Load it in a browser. If you have a ton of blogs I recommend FF.
Thanks,
Andrew
Member — 8th September 2009 (2 years ago) #
I have the exact same problem as cagora,
'localhost' to database 'db_c'
that c is coming back all the time, no matter what I change, the access is denied to a database that ends on a c or _c. I walked through the various tutorials on this forum multiple times, verified it with my webhost, they say it's a bug in the script. The error with the c is coming back. Don't know what to do anymore.
I'm installing it also on a fresh wpmu.
Erstwhile founder — 8th September 2009 (2 years ago) #
Hi Guys,
There's not an issue with Multi-DB that causes that problem. A bad configuration causes that problem.
Multi-DB only attempts to connect to databases you've specified. So if it's trying to connect to a db that doesn't exist then there's a problem in your configuration. Take a close look at the example config files or post your config file here. Mask passwords and only post a sample of the connection lines if you're using 256 or 4096 databases.
Thanks,
Andrew
Become a member