Results 1 to 4 of 4
  1. #1

    Question Basic setting of mysql username and password question

    Hi all,

    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 .

    Thank you very much.
    One Day One Card- Sending Cards To Impact Lives!
    SEO Tips

  2. #2
    Join Date
    May 2002
    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 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

  3. #3
    Join Date
    Aug 2004
    cochin -kerala -india
    To set the password ...use these simple commands...

    # mysql -u root mysql -p
    Enter password:
    mysql>UPDATE user SET Password=PASSWORD('<new_password'>) WHERE user='root';

    you can find in more details at Support for Webhosts

  4. #4
    Thanks guys, will try it out when i get home.

    Thanks again.
    One Day One Card- Sending Cards To Impact Lives!
    SEO Tips

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts