last year i created a dynamic site with php mysql.
i connected to database through below code
$conn=mysql_connect("localhost","hosting_username","hosting_password") or die(mysql_error());
mysql_select_db("database_name",$conn);
now i m planning to create wordpress blog and would like to know whether i should enter same “hosting_username” and “hosting_password” in the “wp-config” file for database username and password.
/** The name of the database for WordPress */
define('DB_NAME', 'wordp');
/** MySQL database username */
define('DB_USER', 'hosting_username');
/** MySQL database password */
define('DB_PASSWORD', 'hosting_password');
/** MySQL hostname */
define('DB_HOST', 'localhost');
will it work fine or i have to create separate user for wordpress db.
phpMyAdmin is not actually part of cPanel. phpMyAdmin is a database management tool…Most hosts configure it to work seamlessly with cPanel or whatever they use. If you allow that user to access all databases you will be fine.
If you are using a cPanel webhost (I would suspect other control panels offer similar functionality) then you need to log into your cPanel, and click the MySQL Database link. You need to create a MySQL database. Then you need to create a MySQL username and assign it a password. Don’t use the same password as your cPanel password, pick something different and unique. Then you need to assign this MySQL user, to the MySQL database that you created, giving it the appropriate permissions.
Then in your wp-config.php file, replace the relevant data.
DB_NAME refers to the MySQL database you created.
DB_USER refers to the MySQL username you created.
DB_PASSWORD refers to the password for the MySQL username you created.
Yes it will work (I do exactly that for my sites). There is no reason for creating a separate user unless you are going to set up each user with access to only the specific tables it needs access to.