Skip to main content

Posts

Showing posts from April, 2018

Install MariaDB in CentOS 6

Add the MariaDB repository First, ensure the list of available packages is up-to-date before installing. Open your SSH terminal and input the following commands. yum -y update Add the MariaDB repository. nano /etc/yum.repos.d/MariaDB.repo For  32-bit  users, paste the following text: [mariadb] name = MariaDB baseurl = http://yum.mariadb.org/10.1/centos6-x86 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1 For  64-bit  users, paste the following text: [mariadb] name = MariaDB baseurl = http://yum.mariadb.org/10.4/centos7-amd64 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1 Save the  MariaDB.repo  file. Install software At this point, installing MariaDB is as simple as running just one command. yum install MariaDB-server MariaDB-client -y Once the installation completes, start MariaDB. service mysql start Next, set MariaDB to start on every boot. chkconfig mysql on Secure MariaDB Secure your MariaD...

Recover MySQL root password or Reset MySQL root Password

Here are the commands you need to type for each step (log in as the root user): Step # 1: Stop the MySQL service: service mysqld stop Output: Stopping MySQL database server: mysqld. Step # 2: Start the MySQL server w/o password: (the service location might be at /usr/bin ) mysqld_safe --skip-grant-tables & Output: [1] 5988 Starting mysqld daemon with databases from /var/lib/mysql mysqld_safe[6025]: started Step # 3: Connect to the MySQL server using the MySQL client: mysql -u root Output: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 56299 Server version: 5.6.34-1 (Debian) Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> Step # 4: Se...