Basic setting of mysql username and password question
First, i would like to apologise for the super newbie question i'm going to ask below..
The scenario is that my local testing platform is WIN XP and i've been doing testing all that on my local machine..via DOS with not much problem.
However, I just uploaded all the database and scripts to the server but i can't seem to get the database connected. I suspect it is the mismatched of the mysql username and password. Therefore my question is, how can i change them via Cpanel on Unix?
I know nothing about Unix system other than reading most of the threads here about username setting..but still can't get the idea...
I really appreciate anyone that is kind enough to explain to me the steps and commands to input. Taking for example, my username is root and password is password .
In Cpanel you need go to Mysql database menu and create database and also database users. Then you should assign database user to your database. When you done above you should write down database name, database user name and also database user password. After assigning your mysl user to database you will be ready to upload your local database exported sql file to unix server. You may do this by phpmyadmin, or directly by shell. in last case simple login to shell, type something like:
mysql -u db_usernabe -p -h localhost dd_name < your_sql.file
and type password for mysql user when you will asked.
After this your database will imported to server.
Ans last action which required that your sites begin work, you should change your scripts setting accordingly your database connection parameters. Usually this is may done by filling your script config.inc.php file. You just should indicate your database server (usually localhost), database name and database user name and password.
PS. Don't forget that you need export your local database to database.sql file and then upload it to server by ftp or file manager utility.
Rustelekom LLC Dedicated server since 2002, RIPE NCC member, LIR, AS51168