Follow on Google News News By Tag Industry News News By Place Country(s) Industry News
Follow on Google News | Replacing MySQL with MariaDB on Linux by Johnathan Mark SmithBy: JohnathanMarkSmith.com Filed Under Linux, MariaDB, MySQL MariaDB is a high performance drop-in replacement for MySQL, developed by some of the original authors of the MySQL project. This will walk you through uninstalling MySQL and then installing MariaDB from their repository using the YUM package manager. WARNING: YOU SHOULD ALWAYS MAKE A BACKUP OF ANY DATABASES BEFORE REMOVE MYSQL!!! AND AGAIN….. WARNING: YOU SHOULD ALWAYS MAKE A BACKUP OF ANY DATABASES BEFORE REMOVE MYSQL!!! Stop MySQL If you have MySQL installed and running its time to stop it by entering the following command: [root@regan ~]# service stop mysqld Removing MySQL Now its time to kiss MySQL goodbye by using the following command: [root@regan ~]# yum remove mysql* (The * is a wildcard, and tells YUM to remove all packages starting with the string “mysql”.) Now let’s add MariaDBs repository. Create the file /etc/yum.repos.d/ [root@regan ~]# vi /etc/yum.repos.d/ Within the file we insert the following: [mariadb] name = MariaDB baseurl = http://yum.mariadb.org/ gpgkey=https://yum.mariadb.org/ gpgcheck=1 You should note that the last part of the baseurl needs to match your CentOS version and arch. In my case this would need to be centos6-amd64, for a 64-bit install, but since x86 (32-bit) is more common I’ve left that in the example above. Save the file and exit your editor. (In vi this is done by holding Shif and pressing : (colon), entering “wq” (without the quotes) for “write quit”, and enter.) Time to install MariaDB To install the components using YUM use the following command: [root@regan ~]# yum install MariaDB-server MariaDB-client That Was Easy Now that it is installed, let’s start the MariaDB service: [root@regan ~]# service mysql start You can see that the service is “mysql” NOT “mysqld” now. Time to Loadin and Seee Let’s try to connect, shall we? [root@regan ~]# mysql -u root -p Enter your database root password when promted. You should see something like this: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 1 Server version: 5.5.30-MariaDB MariaDB Server Copyright (c) 2000, 2013, Oracle, Monty Program Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> That was easy right? you can watch the video below http://www.youtube.com/ End
Account Phone Number Disclaimer Report Abuse
|
|