You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Install PHP, MySQL, phpMyAdmin in Ubuntu 18.04 LTS
Install Mysql Server and MySQL Client
What is the difference between MySQL Server and MySQL Client?
MySql Client:
The mysql-client package allows you to connect to a MySQL server. It will give you the mysql command-line program.
MySql Server:
The mysql-server package allows to run a MySQL server which can host multiple databases and process queries on those databases.
Update Ubuntu
sudo apt update
Upgrade Ubuntu
sudo apt upgrade
Install MySQL Server
sudo apt install mysql-server
Enter root user password if asked.
Install MySQL Client
sudo apt install mysql-client
Configure MySQL
sudo mysql_secure_installation
[sudo] password for USER_NAME_OF_MACHINE:
Would you like to setup VALIDATE PASSWORD plugin?
Press y|Y for Yes, any other key for No:
Please set the password for root here.
New password:
Re-enter new password:
Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
Success.
Disallow root login remotely? (Press y|Y for Yes, any other key for No) :
... skipping.
Remove test database and access to it? (Press y|Y for Yes, any other key for No) :
... skipping.
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
Success.
All done!
Test MySQL service
systemctl status mysql.service
Test connecting to database
sudo mysqladmin -p -u root version
Open Mysql Console
sudo mysql -p -u root
In case the MySQL is not running, start it with
sudo systemctl start mysql
In case you need to restart MySQL, restart it with
sudo systemctl restart mysql
Create database in MySQL console
create database cp_intrafish;
Install mysql-config
sudo apt-get install libmysqlclient-dev
Load Database dump to the newly created database. Here cp_intrafish is the database name and myifm_dump.sql is the SQL dump file.
mysql -p -u root cp_intrafish<myifm_dump.sql
Pretty output in MySQL console. Add \G at the end of your command. This will change the output just for that command, without changing the default output.