I have been successfully installing and using MySQL V5.7 in Google Colab (with Ubuntu 18.04) for quite some time. However trying to install MySQL V8 has repeated failed. I have used the following sequence of commands ..
!apt update
!apt upgrade
#!wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.11-1_all.deb
!wget https://dev.mysql.com/get/mysql-apt-config_0.8.22-1_all.deb
!dpkg -i mysql-apt-config_0.8.*
!sudo apt update
!sudo apt install mysql-server
During the install, I provide the root password and have used both the strong password option as well as the legacy authentication. Everything goes fine upto this point and even the following command
!mysqld --version
returns the correct version
/usr/sbin/mysqld Ver 8.0.28 for Linux on x86_64 (MySQL Community Server - GPL)
After this things go wrong! The MySQL service should have started but it hasn't
!mysql -uroot -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
and when I try to start it, it is not recognised ( neither mysql nor mysqld)
!sudo service mysqld start
mysqld: unrecognized service
in fact, even this fails
!systemctl status mysql
System has not been booted with systemd as init system (PID 1). Can't operate.
What am I doing wrong? or what else should I do? or is it that for some reason, Google Colab with Ubuntu 18.04 does not support MySQL V8
No action required ... just this will do
!apt update > null
!apt -y install mysql-server -V
!/etc/init.d/mysql restart
then check
!mysql --version
mysql Ver 8.0.31-0ubuntu0.20.04.2 for Linux on x86_64 ((Ubuntu))
earlier this used to show Ver 5.7!
Now, with this we can now use CTE, recursion and Windows functions of v8
Check with sudo service mysql start or sudo start mysql once.
Another thing is that google colab instance might not use the system init system at all. That's why it's resulting in System has not been booted with systemd as init system. Check with the sys-v init system once. Its commands look like service service_name start. The same thing happens when trying to start services in WSL.
I need to setup mysql5.6 server in ubuntu 14.04(32 bit). I downloaded mysql-server_5.6.19-1ubuntu14.04_i386.deb-bundle.tar from official site. I installed mysql using below commands:
dpkg -i mysql-5.6.16-debian6.0-x86_64.deb
for server, coummunuty etc which all comes in the tar file one by one. Steps I followed are mentioned in this site:
http://dev.mysql.com/doc/refman/5.6/en/linux-installation-debian.html
I can see myconf.cnf file also.
But when I executed the command to start mysql service it gave me error. Error: mysql service uynrecognized.
Kindly tell me what went wrong with my installation.
Thanks
I'm attempting to install a previous version of MySql (5.5.31) on my Mac OSX device running 10.9 Mavericks. I have been told this is possible, however, I cannot seem to locate a download for 5.5.31 Mac OSX.
I have a later version (5.6.19) installed, and I tried:
brew switch mysql 5.5.31
but I keep getting the error message:
"Error: mysql not found in the Cellar."
And I know this is because there's no 5.5.31 MySql file for it to switch to.
Anyone do this on their Mac?
Thanks
This is an old question, but I stumbled upon it through Google, so here's to anyone to stumbles upon it later.
I was trying to install MySQL 5.5 on OS X 10.10 through Homebrew.
First, you have to add homebrew/versions to your taps with:
$ homebrew tap homebrew/versions
Second, install MySQL 5.5 with:
$ homebrew install mysql55
if that doesn't work, try:
$ homebrew install homebrew/versions/mysql55
After that has successfully installed, you will get the message:
...A "/etc/my.cnf" from another install may interfere with a
Homebrew-built server starting up correctly.
To connect:
mysql -uroot
To load mysql55:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql55.plist Or, if you don't want/need launchctl, you can just run:
mysql.server start ❯ cd /usr/local/Cellar/mys
Try mysql.server start, if that doesn't work you need to update your $PATH. In my case I added /usr/local/Cellar/mysql55/5.5.40/bin to my $PATH in my .zshrc. You can find the location of your installation by using:
$ homebrew info mysql55
After that it should work after you've added that directory to your .zshrc/.bashrc/.bash_profile etc.
I am having troubles starting MySQL Community Server. I am using Ubuntu 13.04. I have downloaded MySQL Community Server 5.6 the Debian package. I don't have any previous MySQL Versions installed.
I installed the package using this command dpkg -i mysql-5.6.14-debian6.0-i686.deb and it was successful.
I found the installation files in /opt/mysql. I opened /opt/mysql/server-5.6/supported-files and then typed: ./mysql.server start.
I got the following error:
The server quit without updating PID file (/opt/mysql/server-5.6/data/ubuntu.pid)
How can I solve that problem?
Thank You.
Several of my colleagues and I have recently upgraded from MySQL 5.5 to MySQL 5.6 using homebrew on our Macs to test locally before upgrading our servers. Since this upgrade, we all have been experiencing intermittent MySQL errors when running our rails code:
Lost connection to MySQL server at 'sending authentication information', system error: 32
We have tried re-making our usernames and passwords in our database, and upping the connection timeout, but neither have fixed the problem. The error logs do not mention the issue. The only workaround we have found when we run into the problem is to kill mysql and restart it. I have even noticed this error more recently using mysql -u root -p on the command line. It seems that once I start getting this error, I cannot exceed my current number of connections no matter what username I use. If I close a connection, then I can re-open one.
We have the following environments:
some of us: Rails 3.2, Ruby 2, mysql2 0.3.13, MySQL 5.6.12, Mac OSX 10.8.4
others of us: Rails 3.2, Ruby 1.9, mysql2 0.3.13, MySQL 5.6.10, Mac OSX 10.8.4
Any ideas what might be causing this?
Thanks!
Julie
None of the answers here helped me, but finally I got MySQL 5.6 to work.
THREE options to fix MySQL 5.6:
(confirmed) Edit /etc/my.cnf (create if not exists) and add:
[mysqld]
innodb_file_per_table = OFF
and restart MySQL. Then for this to work you'll need to dump your databases into SQL file (mysqldump), then drop and re-create the databases, then load the data back.
Change default ulimit value of OSX (suggested by Github user sodabrew): https://superuser.com/questions/261023/how-to-change-default-ulimit-values-in-mac-os-x-10-6
Add the following option to [mysqld] section of my.cnf: table_open_cache = 250. By default it is set to 2000, which is way above OSX's default ulimit. This solution is also not recommended, because it hurts the performance of your MySQL - it forces MySQL to re-open tables often, if you have more than 250 tables: https://mariadb.com/kb/en/optimizing-table_open_cache/
Why this error is happening?
Since MySQL 5.6 innodb_file_per_table option is ON by default, which means that each table's data is stored in its own file. OSX default limit of the number of the open files is 256 per process. Normally this isn't a problem, but in my case I'm running unit tests in parallel, which creates 8 databases with 405 tables each. OSX has a limit of the number of open file handles per process. This StackOverflow answer suggests that this limit is 256, which explains my problem perfectly: before MySQL 5.6 all data from all these 8 databases was in ONE file.
Thanks to my colleague Thomas L. who found a MySQL bug report which hinted this solution!
We had the same problem. This fixed it for us
project-root$ mysql.server stop
project-root$ gem uninstall mysql2
project-root$ bundle install
project-root$ mysql.server start
That's an issue with the latest mysql version that is installed via homebrew.
5.6.x creates the problem. downgrading to 5.5.x solved the issue for me.
You can install old formula versions pretty easily with homebrew:
brew versions mysql will give you the sha you have to checkout in /usr/local to be able to install an old version
cd /usr/local
git checkout 336c976
brew info mysql
This will show you 5.5.29 as the mysql version. You can then uninstall mysql based on these instructions and reinstall simply by running
brew install mysql
and running through the normal installation process with homebrew:
unset TMPDIR
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
Hope that helps.
You can checkout master in /usr/local after installing the old version of mysql after that again. The brew versions command even gives you the command to just checkout the formula for mysql but I don't think that has any advantages over just checking out the whole repository for the sha and then going back to master after installing the old mysql version.
We found that using the following fixes this for us:
brew install mysql --use-llvm
This is on a rails 2.3 ontop of REE (1.8.7) in rbenv on OSX 10.8. YMMV
I'm having the same issue on same configuration (mysql 5.6.12). I've just upgraded mysql with homebrew to version 5.6.13 and the problem is gone.
I struck this problem with mysql 5.6.16, freshly installed via Homebrew on Mavericks, along with rbenv and rails etc.
Decided to reboot before working through the other solutions here. Problem solved!
So if you haven't rebooted since installing mysql etc, I'd recommend restarting before working through the answers here.
What I found worked, was setting table_open_cache to a value no higher than 1000
table_open_cache=1000
I found this on the bug page, very last comment https://bugs.mysql.com/bug.php?id=71960
On Mavericks, this worked for me:
mysql.server stop
brew install mysql
mysql.server start
gem remove mysql2
gem install mysql2
I reinstalled Homebrew after upgrading to Mavericks. Homebrew installed the bottled version of MySQL 5.6.13.