Download: $149   Or   On Demand: $9 /mo
Knowledge Base Knowledge Base   Live Chat Live Chat   Phone +1 (720) 336-8323 M-F 9am-5pm MST
Home
Features
Screenshots
Free Trial
Pricing
Client Login
Knowledge Base
Search:
Knowledge Base » Installation and Upgrade » MySQL command line examples to create a user and database for PHP Live!
MySQL command line examples to create a user and database for PHP Live!

MySQL command line to create a user and database for the PHP Live! system.

 

  1. Login to the MySQL command line.
    mysql -u root -p

  2. Find the MySQL host name.
    SELECT host FROM information_schema.processlist;

    The output will be the hostname (typically localhost).  In this example, let's assume it is localhost.  The actual name may be different and you may want to contact your server admin for more information.

  3. Create the MySQL user for the PHP Live! system.  Replace the phplive_user with the login of your choice and the password to the password of your choice.  In this example, the database for the PHP Live! system will be phplive_db (this can be any name of your choice), the login is phplive_user and the password is password.  The phplive_user will only have access to the database created by the phplive_user user.  The database phplive_db will be created in the next few steps.  We will assign the user to the database here.
    GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON phplive_db.* TO 'phplive_user'@'localhost' IDENTIFIED BY 'password';

  4. Activate the user account and access.
    FLUSH PRIVILEGES;

  5. Exit the MySQL command line.
    exit;

  6. Login as the new MySQL user you previously created.
    mysql -u phplive_user -p

  7. Create a database for the user.
    CREATE DATABASE phplive_db;

  8. From the above example, the MySQL information to provide for the PHP Live! installation is:
    Database Name: phplive_db
    Database Host: localhost
    Database Login: phplive_user
    Database Password: password

 

Front-end MySQL tool recommended:

A front-end MySQL database viewing tool such as PHPMyAdmin is great for creation of databases and many other database administration. If you are not familiar with PHPMyAdmin, visit their website, download it and deploy it on your web server because it will save you a lot of time.

Was this helpful?
could be more helpful? send comment
5 people found this helpful