文档章节

Install MySQL for Database Server

ruyees
 ruyees
发布于 2014/10/05 11:48
字数 428
阅读 3
收藏 0

[root@www ~]# yum -y install mysql-server
[root@www ~]# /etc/rc.d/init.d/mysqld start 
Initializing MySQL database:  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 www.server.world 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!

Starting mysqld:     [  OK  ]

[root@www ~]# chkconfig mysqld on 
[root@www ~]# mysql -u root # connect to MySQL
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.52 Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

# show user info
mysql> select user,host,password from mysql.user; 

# set root password
mysql> set password for root@localhost=password('password'); 
Query OK, 0 rows affected (0.00 sec)
# set root password
mysql> set password for root@'127.0.0.1'=password('password'); 
Query OK, 0 rows affected (0.00 sec)
# set root password
mysql> set password for root@'www.server.world'=password('password'); 
Query OK, 0 rows affected (0.00 sec)
# delete anonymous user
mysql> delete from mysql.user where user=''; 
Query OK, 2 rows affected (0.00 sec)
mysql> select user,host,password from mysql.user;

mysql> exit # quit
Bye
[root@www ~]# mysql -u root -p # connect with root
Enter password:# MySQL root password
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.1.52 Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> exit
Bye
 

本文转载自:http://zuoqiang.iteye.com/blog/1155033

共有 人打赏支持
ruyees
粉丝 3
博文 71
码字总数 0
作品 0
深圳
产品经理
reviewboard 安装

安装 Rewiew Board太复杂,依赖很多,嫌麻烦有个一键安装:https://bitnami.com/stack/reviewboard。下面是手动安装过程 极有可能还要装 安装 配置 问题...

langtu329
2016/09/19
85
0
Uninstall all those broken versions of MySQL and re-install it with Brew on Mac Mavericks

To remove an instance of MySQL from your macOS or OSX installation you need to delete a number of files via the command line, but first ensure that you have database dumps of yo......

丢失的羊羔
2016/12/02
10
0
zabbix3.0之server端部署详解

yum 配置 下载yum配置 rpm -ivh http://mirrors.aliyun.com/zabbix/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm 安装依赖包 [root@localhost conf]# yum install zabbix-......

凛冬一壶酒
06/26
0
0
centos6.5上mysql5.6源码安装

先用yum把依赖包都安装,最好在yum update一下升级系统。关闭selinux。 yum -y install ntp vim-enhanced vixie-cron gcc gcc-c++ gcc-g77 flex bison autoconf automake glibc make gmake g......

落叶刀
2015/09/15
73
0
Installing Zabbix 2.4 on CentOS 6.5

1: Download Package # rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm 2: Install zabbix server packages # yum -y install zabbix-serv......

betterit360
2016/09/19
0
0

没有更多内容

加载失败,请刷新页面

加载更多

.NET 知识整理笔记

1.Web.Config配置文件的节点操作 在Web.Config中写入 <configuration> <connectionStrings> <add name="conStr" connectionString="Data Source=IUCL8V4Y7NW5IRA\SQLEXPRESS;Initia......

Jokeny
9分钟前
0
0
Spring 声明式注解事务实现机制

Spring中注解事务实现机制 在使用@Transactional 注解管理事务时步骤很简单。但是如果对@Transactional理解不够透彻,很容易出现事务不起作用的情况。所以,在对@Transactional的实现机制要有...

狂奔的熊二
10分钟前
0
0
Fastjson - 详解SerializeFilter,格式化对象字段

遇到一个奇葩场景,维护一个老的程序, 应用换了个服务方. 要切接口. 但有以下问题. 接口逻辑稍有不同 , 需要自己按原接口文档,重组逻辑. 接口字段名,字段类型改动较大. 但还要按原接口文档返回...

ol_O_O_lo
10分钟前
0
0
一个小知识点---关于传递引用参数

如果传入引用参数 在方法内new 对象,其改变外层不可见

职业搬砖20年
15分钟前
0
0
Oracle数据导入导出命令及参数介绍(Linux)

1.数据导出 exp system/123456 file=d:\backup\oracle\oracle%date:~0,10%.dmp owner=system log=d:\backup\oracle\oracle%date:~0,10%.log 2.数据导入 imp system/manager@TEST file=d:\d......

lyle_luo
16分钟前
0
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部