Mysql Installation Problems with 18.04
I solved this problem by going to Oracles mysql documentation on MySQL APT Repository which was a huge help, following all the instructions on the page allowed me to install mysql
successfully.
What I did:
- Download the
mysql-apt-conf
tool from http://dev.mysql.com/downloads/repo/apt/ - Install the package using
sudo dpkg -i /PATH/version-specific-package-name.deb
- When installing select
MySQL Server & Cluster
to whatever you want by pressing enter and selecting one ofmysql-5.7
ormysql-8.0
then go toOk
and press enter - Then
sudo apt-get update
(this step is required only for Ubuntu 17.10 or below) - Run
sudo apt install mysql-server
- After the main packages are installed run
mysql_secure_installation
, this will configure the password and other security stuff for mysql
Update
If anyone ran or had to run mysql_secure_installation withsudo
, please note that you might not be able to login into mysql unless you use sudo. When this happens login to mysql console created a new user for mysql then flush all privileges. Check this question right here Connect to mysql server without sudo
Related videos on Youtube
Comments
-
BilboX over 1 year
I installed a fresh copy of 18.04 am installing all the packages that are required. When installing
mysql-server
andmysql-client
I receive the following errordpkg: error processing package mysql-server-5.7 (--configure): installed mysql-server-5.7 package post-installation script subprocess returned error exit status 1 dpkg: dependency problems prevent configuration of mysql-server: mysql-server depends on mysql-server-5.7; however: Package mysql-server-5.7 is not configured yet. dpkg: error processing package mysql-server (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure. Processing triggers for libc-bin (2.27-3ubuntu1) ... Processing triggers for ureadahead (0.100.0-20) ... Processing triggers for systemd (237-3ubuntu10) ... Errors were encountered while processing: mysql-server-5.7 mysql-server E: Sub-process /usr/bin/dpkg returned an error code (1)
I have tried the
purge, autoremove, autoclean, dist-upgrade
routine but it does not work for me.How do I fix this problem, please help
-
Calamity Jane about 5 yearsWith that instruction I have now the error message for mysql-community-server and mysql-server Really weird. So the same error for a different package.
-
BilboX about 5 yearsCan you please put the error message here.
-
Calamity Jane about 5 yearsJob for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details. invoke-rc.d: initscript mysql, action "start" failed. ● mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) Active: activating (auto-restart) (Result: exit-code) since Sun 2019-03-17 20:39:21 CET; 12ms ago Process: 12066 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid (code=exited, status=1/FAILURE)
-
Calamity Jane about 5 yearsby now I have installed, removed, deleted folders, installed again, that I cannot say, what the real status quo is by now except that it is still not running.