LINUX-MYSQL多实例(rpm包安装-失败)
原创woxuewangluo 博主文章分类:MYSQL文档 ©著作权
©著作权归作者所有:来自51CTO博客作者woxuewangluo的原创作品,请联系作者获取转载授权,否则将追究法律责任
1、yum安装mysql:
[root@localhost Desktop]# cat /etc/yum.repos.d/rhel-local.repo
[rhel-source]
name=Red Hat Enterprise Linux $releasever - $basearch - Source
baseurl=file://"/media/RHEL_6.1 i386 Disc 1"/Server
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[root@localhost Desktop]# yum install mysql
Loaded plugins: product-id, refresh-packagekit, subscription-manager
Updating Red Hat repositories.
rhel-source | 4.0 kB 00:00 ...
rhel-source/primary_db | 2.4 MB 00:00 ...
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mysql.i686 0:5.1.52-1.el6_0.1 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
================================================================================
Installing:
Transaction Summary
================================================================================
Install 1 Package(s)
Total download size: 898 k
Installed size: 2.3 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
duration: 712(ms)
Installed products updated.
Installed:
Complete!
[root@localhost Desktop]#
[root@localhost Desktop]# yum install mysql-server
Loaded plugins: product-id, refresh-packagekit, subscription-manager
Updating Red Hat repositories.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mysql-server.i686 0:5.1.52-1.el6_0.1 will be installed
--> Processing Dependency: perl(DBI) for package: mysql-server-5.1.52-1.el6_0.1.i686
--> Processing Dependency: perl-DBD-MySQL for package: mysql-server-5.1.52-1.el6_0.1.i686
--> Processing Dependency: perl-DBI for package: mysql-server-5.1.52-1.el6_0.1.i686
--> Running transaction check
---> Package perl-DBD-MySQL.i686 0:4.013-3.el6 will be installed
---> Package perl-DBI.i686 0:1.609-4.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================================================================
=============================================================================================================================================================
Installing:
Installing for dependencies:
Transaction Summary
=============================================================================================================================================================
Install 3 Package(s)
Total download size: 9.1 M
Installed size: 25 M
Is this ok [y/N]: y
Downloading Packages:
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 28 MB/s | 9.1 MB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
duration: 454(ms)
Installed products updated.
Installed:
Dependency Installed:
Complete!
2、cp安装目录下的mysql所有文件到新目录:
[root@localhost lib]# cp mysql/* mysql_3307/
cp: omitting directory `mysql/mysql'
cp: cannot open `mysql/mysql.sock' for reading: No such device or address
cp: omitting directory `mysql/test'
[root@localhost lib]# /etc/init.d/mysqld stop
Stopping mysqld: [ OK ]
[root@localhost lib]# cp mysql/* mysql_3307/
cp: overwrite `mysql_3307/ibdata1'? y
cp: overwrite `mysql_3307/ib_logfile0'? y
cp: overwrite `mysql_3307/ib_logfile1'? y
cp: omitting directory `mysql/mysql'
cp: omitting directory `mysql/test'
[root@localhost lib]#
3、安装实例:
[root@localhost Desktop]# mysql_install_db --datadir=/var/lib/mysql_3307 --user=mysql
Installing MySQL system tables...
OK
Filling help tables...
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:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'
Alternatively you can run:
/usr/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 /usr ; /usr/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl
Please report any problems with the /usr/bin/mysqlbug script!
下一篇:PHP-防止SQL注入
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
mysql安装for linux(rpm包)
下载地址: http://www.mysql.com/downloads/mysql/一.安装Mysql1.Mysql的安装包有很多个,作用也不同,在
mysql安装 mysql安装for linux mysql rpm包安装 mysql MySQL -
Linux-MySQL
Linux-MySQL
mysql linux 初始化 用户名 数据库