`
- 浏览:
26195 次
- 性别:
-
mysql-5.1.61-linux-x86_64-glibc23.tar.gz 安装笔记
1、建立mysql用户组,mysql用户,并且把mysql用户加入到mysql用户组中。
建立mysql用户组:groupadd mysql
建立mysql用户并加入mysql用户组:useradd mysql -g mysql -p mysql123456 -s /sbin/nologin -M
说明:-g 是加入到mysql用户组,-p是设置密码,-s是设置shell,这里设置的是不让其登录,-M就是不建立用户目录。
2、把按照文件拷贝到:/usr/local/mysql,
用的命令是cp –rf mysql-5.1.61-linux-x86_64-glibc23.tar.gz /usr/local/mysql ,
然后到目录/usr/local/mysql下面解压缩文件:tar -zxvf mysql-5.1.61-linux-x86_64-glibc23.tar.gz
3、到mysql目录下,初始化mysql表,安装 mysql 默认数据库:
cd /usr/local/mysql
[root@localhost mysql]# scripts/mysql_install_db --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:
./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin -u root -h localhost.localdomain password 'new-password'
Alternatively you can run:
./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 . ; ./bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd ./mysql-test ; perl mysql-test-run.pl
Please report any problems with the ./bin/mysqlbug script!
即说明安装成功。
4、修改目录权限,如下:
[root@localhost mysql]# cd ..
[root@localhost local]# chgrp -R mysql mysql
[root@localhost local]# chown -R mysql mysql/data
5、添加到系统自启动,如下:
[root@localhost local]# cp mysql/support-files/mysql.server /etc/rc.d/init.d/mysqld
-- 添加到系统自启动
[root@localhost local]# chkconfig --add mysqld
6、启动mysql服务进程,如下:
[root@localhost local]# /etc/init.d/mysqld start
7、查看mysql是否启动命令
a:启动完成查看mysql状态,命令: /etc/rc.d/init.d/mysqld status,看看m y s q l 是否已经启动.
[root@localhost local]# /etc/rc.d/init.d/mysqld status
SUCCESS! MySQL running (32508)
b: ps -aux | grep mysqld
c:netstat -tl | grep mysql
8、初次登陆mysql 并修改root 密码及设置可连接 主机
-- 默认密码为空
[root@localhost tmp]# /usr/local/mysql/bin/mysql -uroot -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
---------如果出现这个问题则需修改 /etc/my.cnf 文件在文件中mysql.sock路径修改正确,注意[mysqld] 和 [mysql] 都需要配置 mysql.sock路径
重启mysql
[root@localhost local]#/usr/local/mysql/bin/mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 5.1.61 MySQL Community Server (GPL)
Copyright (c) 2000, 2011, 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> use mysql;
---修改root 默认密码
update user set password=PASSWORD("adMin") where host='localhost' and user='root'
delete from user where password ='';
--设置可连接 主机; % 所有都可连接
update user set host='%' where host='localhost' and user='root'
9、退出重启mysql
[root@localhost local]#/etc/init.d/mysqld stop
[root@localhost local]#/etc/init.d/mysqld start
10、其他配置待续。。。。。。。
分享到:
Global site tag (gtag.js) - Google Analytics
相关推荐
MySQL-shared-compat-5.1.61-1.sles10.x86_64.rpm 有mysql client的依赖包 mysql server必装的包
linux下的mysql-5.1.61安装包
mysql-essential-5.1.61-win32.msi 这个版本没有空密码登陆问题
MySQL集群(一台主机安装MariaDB与MySQL同时运行) 以下是在已安装MySQL的情况下,安装MariaDB的主要步骤. [root@mariadb-near-mysql ~]# cat /etc/issue ...mysql-server-5.1.61-1.el6_2.1.x86_64
mysql-5.1.61-winx64.rar
MySQL数据库是Linux操作系统上用得最多的数据库系统,它可以非常方便的与其它服务器集成在一起,如Apache、Vsftpd、Postfix等。...mysql-5.1.61-4.e16.i686.rpm:MySQL数据库客户端程序 mysql-connector-odbc-5.1.
环境:mysql-5.1.61 操作系统:Cent-os6.3 目的:升级为mysql 5.6.19 首先,yum是不可行的.因为yum源没更新,我已经使用了163网易的源,但是还是不行.最新版仍然不是5.6.没办法,mysql分区是5.5之后的功能,要使用分区功能...
5.1.61、漏电动作断路器检验报告
Alfresco Share组件,允许按照“ Alfresco Way”在内容元数据...MySQL 5.1.61-0ubuntu0.10.10.1 (for Alfresco and sample Connectors). MSSQL Server 2005 (for sample tested Connectors). PostgreSQL 7 (for sample
6.其配套软件能一键安装PHP5.2.17、Mysql5.1.61、Zend3.3.3、PhpMyadmin3.4.8、FTP Server、Jmail等多种组件、结合10年虚拟主机管理经验,自动对服务器进行安全设置防止黑客入侵… 注:此软件已经卡巴斯基2012
6.其配套软件能一键安装PHP5.2.17、Mysql5.1.61、Zend3.3.3、PhpMyadmin3.4.8、FTP Server、Jmail等多种组件、结合10年虚拟主机管理经验,自动对服务器进行安全设置防止黑客入侵… 注:此软件已经卡巴斯基2012杀毒...
5.1.42. CASE042:建设部审核结果录入 23 5.1.43. CASE043:证书管理 24 5.1.44. CASE044:需要转正企业查询 24 5.1.45. CASE045:需要换发证书企业查询 24 5.1.46. CASE046:年报表审核 25 5.1.47. CASE047:报表...