I just did a fresh installation of Kubuntu 14.04.3 LTS from an .iso file, and at first glance, I thought MySQL was already installed by default, but I ran into errors trying to connect. I did some more research and think I have a better idea now, but can someone review my findings and questions below?
Is this the right command line to see what packages are installed (I mean in general as well, but in this case, packages related to mysql)?
Here is the output:
From the lines starting with ii, I see both mysql-client-core-5.5 and mysql-server-core-5.5 are installed. So that is why I thought the server and client were good to go. But later, I ran apt-cache show on mysql-server-core-5.5, and it says "This package includes the server binaries but doesn't contain all the infrastructure needed to setup system databases.". I tried apt-cache show mysql-server, and that seems to the package I need. Why does mysql-server not show up in the table above?
When I tried to see if MySQL server was running, I ran "service mysql status" and similar combinations, but they were all unrecognized.
I then tried ps and see mysqld is running:
But when I try to connect using various combinations:
I always get the same error:
It looks like the instance of mysqld running is specifically configured for akonadi use. I see its --defaults-file mysql.conf file has skip_networking inside, and from another thread here I read about it using Linux sockets (I assume the one specified by the --socket flag).
So, am I correct to say that by default, parts of MySQL are installed, but not enough to make it available for general database use? Is the correct next step to apt-get install mysql-server?
Hypothetically, would I be able to install a newer/older/different version of MySQL side-by-side and use that for my dbs, while Akonadi dependencies would continue using the default version still installed? Or, could I install a new version of MySQL by itself (getting rid of the default version), and have Akonadi apps transition transparently?
Is this the right command line to see what packages are installed (I mean in general as well, but in this case, packages related to mysql)?
Code:
$ dpkg -l *mysql*
Code:
Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-========================-=================-=================-===================================================== ii akonadi-backend-mysql 1.12.1-0ubuntu1.1 all MySQL storage backend for Akonadi un libmysql-java <none> <none> (no description available) ii libmysqlclient18:amd64 5.5.44-0ubuntu0.1 amd64 MySQL database client library ii libqt4-sql-mysql:amd64 4:4.8.5+git192-g0 amd64 Qt 4 MySQL database driver un librdf-storage-mysql <none> <none> (no description available) un libreoffice-mysql-connec <none> <none> (no description available) un mysql-client <none> <none> (no description available) un mysql-client-5.0 <none> <none> (no description available) un mysql-client-5.1 <none> <none> (no description available) un mysql-client-core-5.1 <none> <none> (no description available) ii mysql-client-core-5.5 5.5.44-0ubuntu0.1 amd64 MySQL database core client binaries ii mysql-common 5.5.44-0ubuntu0.1 all MySQL database common files, e.g. /etc/mysql/my.cnf un mysql-server-5.0 <none> <none> (no description available) un mysql-server-5.1 <none> <none> (no description available) un mysql-server-core <none> <none> (no description available) un mysql-server-core-5.0 <none> <none> (no description available) un mysql-server-core-5.1 <none> <none> (no description available) ii mysql-server-core-5.5 5.5.44-0ubuntu0.1 amd64 MySQL database server binaries un rsyslog-mysql <none> <none> (no description available)
When I tried to see if MySQL server was running, I ran "service mysql status" and similar combinations, but they were all unrecognized.
Code:
$ service mysql status mysql: unrecognized service
Code:
$ ps -ef | grep mysql tv 1848 1845 0 15:25 ? 00:00:03 /usr/sbin/mysqld --defaults-file=/home/tv/.local/share/akonadi/mysql.conf --datadir=/home/tv/.local/share/akonadi/db_data/ --socket=/tmp/akonadi-tv.xMxJT0/mysql.socket
Code:
$ mysql $ mysql -u tv $ mysql -u tv -p $ mysql -u root
Code:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
So, am I correct to say that by default, parts of MySQL are installed, but not enough to make it available for general database use? Is the correct next step to apt-get install mysql-server?
Hypothetically, would I be able to install a newer/older/different version of MySQL side-by-side and use that for my dbs, while Akonadi dependencies would continue using the default version still installed? Or, could I install a new version of MySQL by itself (getting rid of the default version), and have Akonadi apps transition transparently?
Comment