文档章节

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-......

凛冬一壶酒
2018/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
Ubuntu 14.04 配置 Nginx, MySQL and PHP 环境

版权声明:本文为博主原创文章,未经博主允许不得转载。 目录(?)[+] 原文地址:http://www.cyberciti.biz/faq/install-lemp-linux-nginx-mysql-and-php-stack-on-ubuntu-linux-14-04-lts/ Ng...

刀剑如梦
2016/02/29
106
0

没有更多内容

加载失败,请刷新页面

加载更多

IDE 插件新版本发布,开发效率 “biu” 起来了

近日,Cloud Toolkit正式推出了面向 IntelliJ 和 Eclipse 两个平台的新款插件,本文挑选了其中三个重大特性进行解读,点击文末官网跳转链接,可查看详细的版本说明。 本地应用一键部署到任何...

阿里云云栖社区
40分钟前
6
0
金丝雀发布、滚动发布、蓝绿发布到底有什么差别?关键点是什么?

根据 2017 年的 DevOps 发展报告,高效能组织和低效能组织在软件交付的效率上有数量级上的差异。技术组织的软件交付能力是一种综合能力,涉及众多环节,其中发布是尤为重要的环节。 作为技术...

问题终结者
今天
7
0
Kubernetes Client-go Informer 源码分析

几乎所有的Controller manager 和CRD Controller 都会使用Client-go 的Informer 函数,这样通过Watch 或者Get List 可以获取对应的Object,下面我们从源码分析角度来看一下Client go Informe...

阿里云官方博客
今天
4
0
传统IDC部署网站(三)

11. 重置密码 密钥和密码都支持远程登陆, 二选一 两个都可以登陆, 密钥相对于密码来说,相对安全一点 本地登陆无法是用密钥 修改密码 root 用户 passwd root 修改普通用户 passwd usernam...

miko0089
今天
6
0
bash特性

1.支持别名 alias 2.命令替换 $(COMMANS) 或者 `COMMAND` 3. bash支持的引号: `` :命令替换 "":弱引用,可以实现变量替换 '':强引用,不实现变量替换 4.文件名通配 globbing:(man 7 glo...

忙碌的小蜜蜂
今天
4
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部