• Knowledge Base: MySQL


    1. How do I set the file permission option of MySQL?
    2. How do I reset a Lost root password in MySQL?
    3. What MySQL tools are available?
    4. What will PhpMyadmin allow me to do?
    5. How do I install PhpMyAdmin?
    6. Where can I get help with PhpMyAdmin?
    7. Where can I get more info on MySQL?
    8. How do I connect to MySQL through PHP?
    9. How do I access MySQL as root?
    10. What are the Telnet commands to access MySQL?

    1. How do I set the file permission option of MySQL? - Top

    You need to run the following command as user root in mysql:

    mysql>grant file on *.* to user@localhost;
    mysql>flush privileges;

    Substitute user with the actual mysql username.

    **Warning: Let server owner know that by granting file option to a user, the user can overwrite any world writable file on the server according to the mysql documentation. Even though I couldn't get mysql to write outside of the selected database directory.

    - Updated: October 24, 2001

    2. How do I reset a Lost root password in MySQL? - Top

    Use the procedure below to reset the root mysql password when forgotten by the server administrator:


    1. log into the server as user root
    2. stop the mysql server
      /etc/rc.d/init.d/mysql stop
    3. restart safe_mysqld with option --skip-grant-tables
      /usr/bin/safe_mysqld -Sg
    4. type mysql_admin and when prompted for the password, hit enter on your keyboard
    5. select option 1 and enter root for the user and a password for user root, select either localhost for the server
    6. select 0 to exit mysql_admin
    7. type mysql -u root -p
    8. when prompted for a password hit enter
    9. at the mysql prompt type: flush privileges;
    10. type quit
    11. your new root password is now in effect



    - Updated: October 2, 2001

    3. What MySQL tools are available? - Top

    Currently the basic tools are only accessible as root user logged in with telnet. Type

    client_tools than return

    and select mysql from the menu. You can however do the initial install of phpMyAdmin on the main server as outlined in the FAQ and administer databases for your users from its web based tools.


    - Updated: June 11, 2001

    4. What will PhpMyadmin allow me to do? - Top

    Feature Summary

    • create and drop databases
    • create, copy, drop and alter tables
    • delete, edit and add fields
    • execute any SQL-statement, even batch-queries
    • manage keys on fields
    • load text files into tables
    • create and read dumps of tables
    • export data to CSV values
    • administer multiple servers and single databases


    - Updated: June 4, 2001

    5. How do I install PhpMyAdmin? - Top

    You can install PhpMyAdmin using client_tools under install scripts. You must be logged in telnet as root user to do this.

    We are currently allowing you to install version 2.1 the latest release, if you installed 1.2.6 the first version we were offering you can reinstall to upgrade on a domain. Keep in mind the config file will need to be redone if customized by your client.


    - Updated: June 4, 2001

    6. Where can I get help with PhpMyAdmin? - Top

    Full documentation can be found at
    phpWizard.net.

    If you configure PhpMyAdmin properly you can manage your customer database setups from a webpage. Remember the configuration has to be for root user to have access to do this.

    - Updated: June 4, 2001

    7. Where can I get more info on MySQL? - Top

    MySQL online reference

    - Updated: May 25, 2001

    8. How do I connect to MySQL through PHP? - Top

    Use the following outline to connect and begin querying the MySQL server from within your PHP scripts. Remember that you cannot connect to your databases remotely due to security reasons. You can only connect to them from localhost.

    1. Connect to the MySQL Server
    Use the following statement to connect to the database server. Substitute the username, and password for ones you have created in the WebControl System.

    MYSQL_CONNECT('localhost','USERNAME','PASSWORD');

    2. Select Your Database
    Use the following statement to select the database you wish to connect to. Make sure you substitute your database name for the example.
    @mysql_select_db('DATABASENAME');

    3. Executing A Query
    You are now ready to execute your queries. (Most problems that arise with your scripts will be due to incorrect permission settings.)

    - Updated: March 15, 2001

    9. How do I access MySQL as root? - Top

    Type the following as super user on your server.

    mysql -u root mysql

    There is an administration tool you can use as super user by typing the following.

    client_tools

    goto menu option 9 for MySQL

    When its asks for password just hit 'Enter' the first time.


    - Updated: July 16, 2001

    10. What are the Telnet commands to access MySQL? - Top

    Use the following outline to connect and begin querying the MySQL server from a Telnet session. Remember that you cannot connect to your databases remotely due to security reasons, you can only connect from localhost.

    1. Connect to the MySQL Server
    servername:> mysql -u username -p

    2. Connect to the Database
    mysql> use DATABASENAME;

    3. Receiving Help
    mysql> help

    - Updated: July 16, 2001

    [e-Mail me the FAQs]    -     [Search our FAQs]