Notes on MySQL install on Ubuntu.
Versions
- Ubuntu 14.04
- MySQL
Notes
All commands as root/sudo.
Install MySQL
- apt-get install mysql-server
- apt-get install php5-mysql (if you're connecting from PHP)
See the notes on Ubuntu.com but specifically change the binding:
- vi /etc/mysql/my.cnf
- change bind-address to servers address or comment it
Create a Database and grant access:
- mysql -u root -p
- CREATE DATABASE <database name>;
-
CREATE USER '<mysql username>'@'localhost' IDENTIFIED BY '<password>;
- GRANT ALL PRIVILEGES ON <mysql username>.* TO '<database name>'@<client server name or IP address> IDENTIFIED BY '<mysql username password>';
- quit
No comments:
Post a Comment