In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
I. system environment
A, system Centos 6.5x64bit
[root@mytest ~] # uname-aLinux mytest 2.6.32-431.el6.x86_64 # 1 SMP Fri Nov 22 03:15:09 UTC 2013 x86 "64 GNU/Linux
Mysql package: mysql-5.1.72
B. Software required
Mysql-5.1.72.tar ncurses.tar
Second, installation
Unpack the downloaded package and install it:
[root@myser tools] # tar xf mysql-5.1.72.tar.gz [root@myser alidata] # ls mysql-5.1.72 mysql-5.1.72.tar.gz [root@myser tools] # cd mysql-5.1.72
[root@myser mysql-5.1.72] #. / configure-prefix=/application/mysql
An error will be reported here at the installation, prompt
Checking for termcap functions library... Configure: error: No curses/termcap library found
Prompt missing curses program
[root@myser mysql-5.1.72] # yum install ncurses-devel-y
Then rerun the command installed above.
[root@myser mysql-5.1.72] #. / configure-prefix=/application/mysql
. . .
. .
/ bin/rm: cannot remove `libtoolT': No such file or directory
Config.status: executing default commands
Thank you for choosing MySQL!
Remember to check the platform specific part of the reference manual
For hints about installing MySQL on your platform.
Also have a look at the files in the Docs directory.
Prompt that the installation is complete
Compile now
[root@myser mysql-5.1.72] # make & & make install # it will take a long time
[root@myser support-files] # pwd
/ root/alidata/mysql-5.1.72/support-files
[root@myser mysql-5.1.72] # cd support-files/
[root@myser support-files] # cp my-small.cnf / etc/my.cnf
Cp: overwrite / etc/my.cnf'? Y
[root@myser support-files] # cp mysql.server.sh / etc/init.d/mysqld
[root@myser support-files] # mkdir / application/mysql/data # create a directory for storing mysql data files
[root@myser support-files] # groupadd mysql # create a mysql group
[root@myser support-files] # useradd-g mysql-M-s / sbin/nologin # create mysql users belong to the mysql group, do not configure the home directory and do not log in
[root@myser support-files] # chown-R mysql.mysql / application/mysql/ # configure data directory permissions
Third, initialize the database
[root@myser support-files] # / application/mysql/bin/mysql_install_db-basedir=/application/mysql/-datadir=/application/mysql/data/-user=mysql
WARNING: The host 'myser' could not be looked up with resolveip.
This probably means that your libc libraries are not 100% compatible
With this binary MySQL version. The MySQL daemon, mysqld, should work
Normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
When specifying MySQL privileges!
Installing MySQL system tables...
180102 16:43:02 [Warning]'--skip-locking' is deprecated and will be removed in a future release. Please use'--skip-external-locking' instead.
OK
Filling help tables...
180102 16:43:03 [Warning]'--skip-locking' is deprecated and will be removed in a future release. Please use'--skip-external-locking' instead.
OK
To start mysqld at boot time you have to copy
Support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER!
To do so, start the server, then issue the following commands:
/ application/mysql//bin/mysqladmin-u root password' new-password'
/ application/mysql//bin/mysqladmin-u root-h myser password' new-password'
Alternatively you can run:
/ application/mysql//bin/mysql_secure_installation
Which will also give you the option of removing the test
Databases and anonymous user created by default. This is
Strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
Cd / application/mysql/; / application/mysql//bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
Cd / application/mysql//mysql-test; perl mysql-test-run.pl
Please report any problems with the / application/mysql//scripts/mysqlbug script!
[root@myser support-files] # / application/mysql/bin/mysqld_safe & start the database
[1] 52951
[root@myser support-files] # 180102 16:44:20 mysqld_safe Logging to'/ application/mysql/data/myser.err'.
180102 16:44:20 mysqld_safe Starting mysqld daemon with databases from / application/mysql/data
Check to see if it is started and check the port
[root@myser support-files] # netstat-lntpu | grep mysql
Tcp 0 0 0.0.0.0 3306 0.0.0.015 * LISTEN 53056/mysqld
[root@myser support-files] # chkconfig-- add mysqld [root@myser support-files] # chkconfig mysqld on [root@myser support-files] # chmod + x / etc/init.d/mysqld
The ending process of mysql
[root@myser support-files] # pkill mysql
The second way to start mysql
Edit the mysql file first
[root@myser tmp] # vi / etc/init.d/mysqld
# overwritten by settings in the MySQL configuration files.
Basedir=/application/mysqldatadir=/application/mysql/data
# Default value, in seconds, afterwhich the script should timeout waiting
# for server start.
[root@myser tmp] # vi / etc/profile
Add PATH= "/ application/mysql/bin/:$PATH" # to the end of the file:
[root@myser tmp] # source / etc/init.d/mysqld
[root@myser tmp] # / etc/init.d/mysqld start
/ etc/init.d/mysqld: line 270: @ HOSTNAME@: command not found
/ etc/init.d/mysqld: line 279: @ HOSTNAME@: command not found
Starting MySQL. SUCCESS!
[root@myser tmp] # / etc/init.d/mysqld stop
/ etc/init.d/mysqld: line 270: @ HOSTNAME@: command not found
/ etc/init.d/mysqld: line 279: @ HOSTNAME@: command not found
Shutting down MySQL. SUCCESS!
[root@myser tmp] # netstat-lntp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
Tcp 0 0 0.0.0.0:22 0.0.0.0: LISTEN 1368/sshd
Tcp 0 0 0.0.0.0:9191 0.0.0.0: LISTEN 1354/procstart
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.