How to create a MySQL database on VPS?
Are there any ways to create a MySQL database on my VPS without using phpMyadmin or user interface?
I mean that I want to create database, username, password for db by commands on my console.
Is it possible?
asked by rosanne
1. CONNECT TO SERVER
How to connect to server: http://netcreator.us/webmaster-forum/19/how-to-connect-to-server
2. HOW TO INSTALL MYSQL
Now, if you don't have MySQL installed on your server, you can do it by running:
sudo yum install mysql-server
sudo /sbin/service mysqld start
3. HOW CREATE DATABASE AND USER
After installs completed, log into your MySQL database as root by typing:
Create a database:
CREATE DATABASE new_database_name_here;
Create an user and set password:
GRANT ALL PRIVILEGES ON new_database_name_here.* TO 'new_username_here'@'localhost' IDENTIFIED BY "new_database_password_here";
Flush privileges (like refresh)
If you have PHP installed on, you can connect to your db through PHP and then run same jobs.