The problem and solution of installing MARIADB database under Linux (binary version installation) _linux

Source: Internet
Author: User

The MARIADB database is divided into source and binary versions, the source version requires CMake compilation, and this is the binary version installation

# tar zxvf mariadb-5.5.31-linux-x86_64.tar.gz # mv Mariadb-5.5.31-linux-x86_64/usr/local/mysql (necessary, Many scripts or executable programs will access this directory directly) # Groupadd MySQL add MySQL group # useradd-g MySQL mysql add MySQL user and attribution to MySQL group # chown Mysql:mysql 
-rf/usr/local/mysql sets the user and user group ownership of the MySQL directory.  # chmod +x-rf/usr/local/mysql Grant executable permissions # CP/USR/LOCAL/MYSQL/SUPPORT-FILES/MY-MEDIUM.CNF/ETC/MY.CNF copy default MySQL profile to/etc Table of Contents #/usr/local/mysql/scripts/mysql_install_db--user=mysql Initialization Database # cp/usr/local/mysql/support-files/mysql.server/e Tc/init.d/mysql copy MySQL service program to system directory # chkconfig MySQL on add MySQL to system service and set to boot up # service MySQL start MySQL #vim/etc/pr
Ofile Edit Profile To add the MySQL executable path to the system path export path=/usr/local/mysql/bin: $PATH #source/etc/profile make path effective. #mysqladmin-u root password ' Yourrootpassword ' sets the root account and password #mysql-uroot-p login to MySQL using root user [none]>use mysql switch to MySQL number
According to the library. [Mysql]>select user,host,password from user; --View system permissions [Mysql]>drop user ' @ ' localhost '; --Delete unsafe accounts [mysql]>drop user root@':: 1 '; [Mysql]>drop user root@127.0.0.1;

[Mysql]>select user,host,password from user; -View system permissions again to ensure that unsafe accounts are deleted.

[Mysql]>flush privileges; --Refreshing permissions

1) modify character set to UTF8

#vi/etc/my.cnf

Add default-character-set = UTF8 under [client]

Add character_set_server = UTF8 under [mysqld]

Complete the reboot: #service mysql restart

2 Increase error log

#vi/etc/my.cnf

Add under [mysqld]:

Log-error =/usr/local/mysql/log/error.log
general-log-file =/usr/local/mysql/log/mysql.log

Complete the reboot: #service mysql restart

3) set to case-insensitive, Linux defaults to case-sensitive.

#vi/etc/my.cnf

Add under [mysqld]:

Lower_case_table_name=1

Complete the reboot: #service mysql restart

FATAL error:could not found./bin/my_print_defaults Solution

Error message:

Fatalerror:couldnotfind./bin/my_print_defaults
If You are the using a binary release, your must run this script from
WI Thin the directory the archive extracted into. If you are compiled
MySQL yourself you must run ' make install '.

Or

[Root@bogon scripts]#/usr/local/mysql/scripts/mysql_install_db--user=mysql&
[1] 16874
[Root@bogon scripts]#
FATAL error:could./bin/my_print_defaults If You
are compiled from source, and need to run ' make I Nstall ' to
copy the software into the correct location ready for operation.
If you are are using a binary release, your must either be
on the top level of the extracted archive, or pass the--basedir Option
pointing to that location.

Workaround:

[Root@bogon scripts]#/usr/local/mysql/scripts/mysql_install_db--user=mysql--basedir=/usr/local/mysql--datadir=/ Usr/local/mysql/data & (This is very important)

Start the MySQL times wrong mysqld_safe Logging to '/usr/local/mysql/data/zrf.err '.

The above is a small set of Linux to introduce the installation of MARIADB database problems and solutions (binary version of the installation), I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!

Error message:

[Root@zrf ~]#/usr/local/mysql/bin/mysqld_safe--user=mysql&
[1] 3527
[root@zrf ~]# 101021 16:37:39 mysqld _safe Logging to '/usr/local/mysql/data/zrf.err '.
101021 16:37:39 Mysqld_safe starting mysqld daemon with databases From/usr/local/mysql/data 101021 16:37:39
Afe mysqld from PID File/usr/local/mysql/data/zrf.pid ended

Solution:

/usr/local/mysql/libexec/mysqld:table ' mysql.plugin ' doesn ' t exist

The problem should be out here! Re-initialize the database to see if the problem can be solved!

#/usr/local/mysql/bin/mysql_install_db--user=mysql

The above is a small set of Linux to introduce the installation of MARIADB database problems and solutions (binary version of the installation), I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.