Install the Mysql
Mysql is one of the most commen used database in the word, and it perfectly works with PHP.
It is very easy to install Mysql in the Ubuntu.
Code is below:
|
|
The first two commands are for update and upgrade for the whole system.
The 3rd is install mysql server. After installation, you can
|
|
start or stop service.
The 4th is a secure process of install mysql. It can provide the basic security configuration.
There are some important information:
|
|
Mysql Workbench
Mysql workbench is a very good mysql management tool with good user interface.
If you want to connect to the remote mysql database, you still need some configuration.
what you should have
- mysql server
- remote ip address
- mysql username and password
- mysql workbench (could download from oracle)
Configuration
- make sure your mysql server is running well on the server.
- Goes to Server Management pannel and open mysql port, 3306. (This is in your service provide web page)
- Build a new connection in Mysql Workbench, and input remote Ip address, username, and password. Test Connection.
Potential Errors
- Error (61)
This is because your server did not open for all ip address.
What you can do, go to your server.
|
|
check the open ip address and port
And
|
|
Change
|
|
to
|
|
Restart mysql server
|
|
After that, you may can login into your remote mysql database.
However, if you set up prohibit root remote login.
You can do the following process, go into mysql:
|
|
The first code give all the rights to root and allow it can login from ‘%’ (means anywhere) with ‘password’ (it will cancel the original password when remotely login), root user can also grant other user.
The seconde code refresh the privilege and make it useful.
This is the method to allow root user login into DB remotely. However, it is not very safe to use it.
Thus, we can create other users to manage DB.
|
|
About user management,
There are couples keywords:
|
|
If you want to have profound knowledge, can explore by yourself.