文档章节

Install MySQL for Database Server

ruyees
 ruyees
发布于 2014/10/05 11:48
字数 428
阅读 3
收藏 0
点赞 0
评论 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
 

© 著作权归作者所有

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

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

langtu329 ⋅ 2016/09/19 ⋅ 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 ⋅ 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-......

凛冬一壶酒 ⋅ 2017/06/11 ⋅ 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 ⋅ 0

A Note on Spring Boot - 3

Download spring-boot-example.zip - 7.5 KB Introduction This is a note on Spring Boot and Hibernate. Background This is a note on Spring Boot and Hibernate. The attached Maven pr......

Dr. Song Li ⋅ 2017/12/18 ⋅ 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 ⋅ 0

install Drupal 7.0 on FreeBSD 8

Our Prerequisites: FreeBSD 8.2 , MySQL 5.x, PHP 5.x, Apache 2.x Show stopper.. I got this notice: Database type * I have mysql server 5.5.11 installed and Drupal 7 install does ......

芒果龙 ⋅ 2011/10/20 ⋅ 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

Creating a mirror of the Library Genesis

Creating a mirror of the Library Genesis The Library Genesis has three main components: 1) book repository (book files) 2) MySQL database (book records) 3) Web-server (dynamic W......

NeoYoung ⋅ 04/24 ⋅ 0

Centos6.6安装zabbix server 3.2

Centos6.6安装zabbix server 3.2 mysql,php,tengine 安装包和表分区脚本下载:https://pan.baidu.com/s/1o80fF8A 1.服务器信息 ip:192.168.106.149 关闭selinux,iptables # setenforce 0 #......

jungong ⋅ 2016/12/28 ⋅ 0

没有更多内容

加载失败,请刷新页面

加载更多

下一页

JavaScript零基础入门——(八)JavaScript的数组

JavaScript零基础入门——(八)JavaScript的数组 欢迎大家回到我们的JavaScript零基础入门,上一节课我们讲了有关JavaScript正则表达式的相关知识点,便于大家更好的对字符串进行处理。这一...

JandenMa ⋅ 今天 ⋅ 0

sbt网络问题解决方案

转自:http://dblab.xmu.edu.cn/blog/maven-network-problem/ cd ~/.sbt/launchers/0.13.9unzip -q ./sbt-launch.jar 修改 vi sbt/sbt.boot.properties 增加一个oschina库地址: [reposit......

狐狸老侠 ⋅ 今天 ⋅ 0

大数据,必须掌握的10项顶级安全技术

我们看到越来越多的数据泄漏事故、勒索软件和其他类型的网络攻击,这使得安全成为一个热门话题。 去年,企业IT面临的威胁仍然处于非常高的水平,每天都会看到媒体报道大量数据泄漏事故和攻击...

p柯西 ⋅ 今天 ⋅ 0

Linux下安装配置Hadoop2.7.6

前提 安装jdk 下载 wget http://mirrors.hust.edu.cn/apache/hadoop/common/hadoop-2.7.6/hadoop-2.7.6.tar.gz 解压 配置 vim /etc/profile # 配置java环境变量 export JAVA_HOME=/opt/jdk1......

晨猫 ⋅ 今天 ⋅ 0

crontab工具介绍

crontab crontab 是一个用于设置周期性被执行的任务工具。 周期性执行的任务列表称为Cron Table crontab(选项)(参数) -e:编辑该用户的计时器设置; -l:列出该用户的计时器设置; -r:删除该...

Linux学习笔记 ⋅ 今天 ⋅ 0

深入Java多线程——Java内存模型深入(2)

5. final域的内存语义 5.1 final域的重排序规则 1.对于final域,编译器和处理器要遵守两个重排序规则: (1)在构造函数内对一个final域的写入,与随后把这个被构造对象的引用赋值给一个引用...

江左煤郎 ⋅ 今天 ⋅ 0

面试-正向代理和反向代理

面试-正向代理和反向代理 Nginx 是一个高性能的反向代理服务器,但同时也支持正向代理方式的配置。

秋日芒草 ⋅ 今天 ⋅ 0

Spring 依赖注入(DI)

1、Setter方法注入: 通过设置方法注入依赖。这种方法既简单又常用。 类中定义set()方法: public class HelloWorldOutput{ HelloWorld helloWorld; public void setHelloWorld...

霍淇滨 ⋅ 昨天 ⋅ 0

马氏距离与欧氏距离

马氏距离 马氏距离也可以定义为两个服从同一分布并且其协方差矩阵为Σ的随机变量之间的差异程度。 如果协方差矩阵为单位矩阵,那么马氏距离就简化为欧氏距离,如果协方差矩阵为对角阵,则其也...

漫步当下 ⋅ 昨天 ⋅ 0

聊聊spring cloud的RequestRateLimiterGatewayFilter

序 本文主要研究一下spring cloud的RequestRateLimiterGatewayFilter GatewayAutoConfiguration @Configuration@ConditionalOnProperty(name = "spring.cloud.gateway.enabled", matchIfMi......

go4it ⋅ 昨天 ⋅ 0

没有更多内容

加载失败,请刷新页面

加载更多

下一页

返回顶部
顶部