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.
Login to the MySQL command line. mysql -u root -p
Find the MySQL host name. SELECT host FROM information_schema.processlist;
The output will be the hostname (typically localhost). In this example, we will assume it is localhost.
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, the login is phplive_user and the password is password. The phplive_user will only have access to the database created by the phplive_useruser. 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';
Activate the user account and access. FLUSH PRIVILEGES;
Exit the MySQL command line. exit;
Login as the new MySQL user you previously created. mysql -u phplive_user -p
Create a database for the user. CREATE DATABASE phplive_db;
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.