I am using Centos 6.5 and have just installed MariaDB-sever and MariaDB-client a while ago.
The first problem is that I start MariaDB by the command /etc/init.d/mysqld start instead of /etc/init.d/mysql start (because there is no mysql file in init.d). So currently I am baffled because I don't know what I started is MySql or MariaDB.
That leads to the second problem. According to their Knowledge base, I tried mysql -u root -p to log in. But it displayed MySql instead of MariaDB, about which I feel wrong:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.1.73 Source distribution
MySQL [(none)] >
So, am I running MariaDB or MySQL?
Yes, what you have started is wrong - it is running MySQL 5.1.73. You should uninstall your "distribution" provided MySQL (which ships with CentOS 6.5) and just install MariaDB.
You can do this by looking at: rpm -qa |grep -i mysql and removing those packages. Just do a clean install of MariaDB and you should be fine.
Some distributions ship /etc/init.d/mysqld, some - /etc/init.d/mysql . It makes no difference, just different script names.
MariaDB origins from MySQL, so if you see MariaDB in the prompt then it's MariaDB. You will never see MariaDB in Oracle's MySQL.
Related
in my brew I have 2 mysql versions:
mysql installed versions: 5.7.20_1, 8.0.11
I switch to 5.7.20_1, type mysql.server start and all good, I can type mysql hit enter and im in the shell.
now, I switch to 8.0.11 type mysql.server start and get:
Starting MySQL
.... ERROR! The server quit without updating PID file (/usr/local/var/mysql/My-MBP-2.pid).
I can only start 8.0.11 version with brew services start mysql but then i dont know how to open its shell...so confused. just wanted to upgrade from 5.7.20_1
I'm a little frustrated at this point, so I had to come for aid to stackoverflow lol I've been stuck trying to setup the dev environment for 3h...
This is what's happening, the new version of mysql doesn't support compatible client-side authentication mechanisms for the new server plugin.
More info here
So at this point I had MySQL installed with version 8.0 and I'm trying to revert it back to 5.7 because none of my node.js projects work locally.
Now, I followed this to uninstall MySQL completely.
and this to install multi version with the difference of instead of writing mysql56 I wrote mysql#5.7 because homebrew/versions/ is deprecated.
So... once I do that I go to the terminal and check:
sudo mysql -v
and I get this:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
That is if I remove the current agent (the new version 8.0), if I add it back:
# Start agent for current version of mysql (including on login)
ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
then it would show me this:
The older version which is the one I want is already linked:
brew link --force mysql#5.7
now... here is the funny thing, when I type: mysql --version
it says: mysql Ver 14.14 Distrib 5.7.23, for osx10.13 (x86_64) using EditLine wrapper
And when I go to my node.js env. to run a query or something, it says:
Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client
which is the problem mentioned on the other posts about MySQL versioning.
Can someone lend me a hand please. Thanks guys
Brew was suppoused to give me a nice and quick way to install that version, but I ended up even forgeting what I was developing to troubleshoot MySQL... So I decided to go to the oracle page and download it from there. I made a guide, in case another person has the same problem, to read it go here.
If someone has time and wants to have some fun with brew let me know what's the fix for that :)
I use windows and I have previously installed mysql 5.5 for some legacy project, and now I want to use 5.7 for a new one, so I installed 5.7 in another directory, on another port and having different data directory, my problem is when i launch mysql from cmd like:
W:\MySQL57\bin> mysql -u root -p
It results in this:
W:\MySQL57\bin>mysql -u root -p
Enter password: *****
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.5.54-log MySQL Community Server (GPL)
And I am definitely sure that MySQL57 is directory for 5.7 MySQL, so what's wrong with mysql command line tool and how can i fix it to be able to use both mysqls in cmd?
The mysql command you are using is probably the 5.7 version, you can check this with :
W:\MySQL57\bin>mysql -v
But this is just the client !
The problem is your server version, you may have 2 versions running (5.5 and 5.7), and as you haven't specified the port you are using the default one which is used by the first server (5.5).
Try to find the port for the second version (3307 ?) or kill the 5.5 server when you are connecting to the 5.7.
You are calling the default mysql set in Environment Variable. If you want to use a specific mysql, you need to provide the path too
W:\MySQL57\bin>"W:\MySQL57\bin\mysql" -u root -p
In case of mysql not working, you can call mysqld.
If you want mysql 5.7 to be default, just change it from Environment Variable https://dev.mysql.com/doc/mysql-windows-excerpt/5.7/en/mysql-installation-windows-path.html
A. First things first:
Mr. Google hasn't helped me to found any reply to my question
above
Yes, I have read a solution to the opposite question here
How to upgrade MySQL to MariaDB in XAMPP in 5 minutes on Windows
(and it hasn't helped me: MySQL simply doesn't start)
I don't expect replies like 'MariaDB is better, - stop your silly
exercises'.
B. I am working with MySQL Workbench and because of that don't want to face any incompatibilities either now or in future.
C. Can someone share their experience (if any) in solving this problem?
Running XAMPP with MySQL
Here are exact step by step instructions for truly integrating MySQL into XAMPP on Windows. This has been successfully tested with Windows 10 and XAMPP 7.3.11 for both MySQL 8.0.18 and 5.7.28.
Stop MySQL (which actually is MariaDB) in the XAMPP Control Panel.
Download the MySQL community server as zip archive (Windows 64 bit version)
Rename C:\xampp\mysql to C:\xampp\mariadb
Extract the downloaded zip archive to C:\xampp\mysql. Make sure you extract the folder level which has the subfolders bin, include, lib etc.
Copy C:\xampp\mariadb\bin\my.ini to C:\xampp\mysql\bin
Open C:\xampp\mysql\bin\my.ini in an editor and comment out the line starting with key_buffer= in the [mysqld] section.
Open a command prompt and run the following commands:
For MySQL 8.0.18:
cd C:\xampp\mysql
bin\mysqld --initialize-insecure
start /b bin\mysqld
bin\mysql -u root
CREATE USER pma#localhost;
SOURCE C:/xampp/phpMyAdmin/sql/create_tables.sql;
GRANT SELECT, INSERT, DELETE, UPDATE, ALTER ON phpmyadmin.* TO pma#localhost;
ALTER USER root#localhost IDENTIFIED WITH mysql_native_password BY '';
ALTER USER pma#localhost IDENTIFIED WITH mysql_native_password BY '';
\q
bin\mysqladmin -u root shutdown
For MySQL 5.7.28:
cd C:\xampp\mysql
bin\mysqld --initialize-insecure --log_syslog=0
start /b bin\mysqld --log_syslog=0
bin\mysql -u root
CREATE USER pma#localhost;
SOURCE C:/xampp/phpMyAdmin/sql/create_tables.sql;
GRANT SELECT, INSERT, DELETE, UPDATE, ALTER ON phpmyadmin.* TO pma#localhost;
\q
bin\mysqladmin -u root shutdown
Start Apache and MySQL in the XAMPP Control Panel.
Go to http://localhost/phpmyadmin and verify that your database server is now reported as MySQL Community Server.
You can use the following way.
Stop MariaDB in Xampp which show as mysql running...
Download the installer for windows mysql Installer
Follow the instruction.
Now start Apache2 and clear cookie in your browser. Now you can see phpmyadmin and workbench showing Server type: MySQL
If you want to stick to MariaDB then you can use sqlyog also.
Hope it answer your question
You have to do little adjustment with xampp in order to use MySQL instead of MariaDB . I just did following and its worked , i think it may helpful to others also.
Download and install mysql installer.
2.stop xampp and rename the mysql folder inside the xampp directory(may be its not necessary! )
3.just start Apache only from xampp control panel . No need to start mysql.
4.Last step . Make sure your running MySQL in your system . That's it ..
Check php admin panel there you can see Server type: MySQL instead of MariaDB ...
Thanks..
I just upgraded XAMPP because of PHP 7. I am also using mysql workbench. I want to be as close to production as I can, but my webhoster supports only mysql. These where my reasons to switch back from mariadb to mysql
I followed these steps: (also max 5min)
https://gist.github.com/odan/c799417460470c3776ffa8adce57eece
i cannot get mysql workbench 5.2 to work. i have mamp and mamp pro installed and running and no matter what type of connection i try it just wont connect. what can i do?
i have a mac with snow leopard
In MySQL workbench use Connection Method: Local Connection/Pipe and in the setting Socket/Pipe path enter: /Applications/MAMP/tmp/mysql/mysql.sock then enter your root username/password.
There are two tasks that need to be fixed to get MySQL Workbench working with a MAMP installation:
1) The Start/Stop/Status commands for the MySql server need to changed from the Server Instance configuration to the following:
Set the Start MySQL command to:
/Applications/MAMP/bin/startMysql.sh
Set the Stop MySQL command to:
/Applications/MAMP/bin/startMysql.sh
Set the Check MySQL Status command to:
ps xa | grep "/Applications/MAMP/Library/bin/[m]ysqld"
2) The my.cnf file needs to be created manually and the appropriate permissions given through a terminal window:
Utilities -> Terminal
sudo touch /etc/my.cnf
sudo chown joeb /etc/my.cnf
Changed joeb with your username.
If you want a more detailed guide, see MAMP, MySQL Workbench, WordPress installation and setup guide for MAC.
I follwed these instructions and got it to work: http://chrischarlton.us/tip/using-mysql-workbench-mamp-pro