创建用户mysql并加入到mysql组

groupadd mysql #添加mysql组
useradd -g mysql -s /sbin/nologin mysql
#创办顾客mysql并参与到mysql组,分歧意mysql顾客向来登陆种类
mkdir -p /data/mysql
#创办MySQL数据库存放目录
chown -R mysql:mysql /data/mysql
#安装权限

tar -zxf mysql-5.6.30.tar.gz
cd mysql-5.6.30
cmake . -DCMAKE_INSTALL_PREFIX=/web/mysql
-DMYSQL_DATADIR=/web/mysql/data -DWITH_INNODB_MEMCACHED=ON
make&&make install                            
  
#(中蓝这里能够平昔复制作而成shell脚本安装)

cd /web/mysql
初始化
./scripts/mysql_install_db –user=mysql #生成mysql系统数据库

加盟自运营
cp ./support-files/mysql.server /etc/rc.d/init.d/mysqld
#把Mysql加入系统运转
chkconfig mysqld on #参与开机运转

装完MySQL修改my.cnf
mv /etc/my.cnf /etc/my.cnf.bak   
#(mysql暗许先读/etc/my.cnf,所以改下名字,不用那几个文件)
动用mysql安装路径下的my.cnf
datadir=/data/mysql     #(数据库路线卡塔尔国  

增多意况变量  /etc/profile  末行  source /etc/profile生效
创建用户mysql并加入到mysql组。创建用户mysql并加入到mysql组。PATH=/web/mysql/bin:$PATH
export PATH

service mysqld start
这个时候输入MySQL可一贯踏向
不进入mysql
mysqladmin -u root -p password ’123’ 设置密码

进入MySQL
创建用户mysql并加入到mysql组。update user set password=” where user=’root’;  修改密码 
’’为空是空密码。。 ’123’ 为密码是123

service mysqld restart #重启

 

 

 

 

创建用户mysql并加入到mysql组。备注: cmake 编译mysql 时报错

CMake Error at cmake/readline.cmake:85 (MESSAGE):
  Curses library not found.  Please install appropriate package,

      remove CMakeCache.txt and rerun cmake.On Debian/Ubuntu, package
name is libncurses5-dev, on Redhat and

derivates it is ncurses-devel.
Call Stack (most recent call first):
  cmake/readline.cmake:128 (FIND_CURSES)
  cmake/readline.cmake:202 (MYSQL_USE_BUNDLED_EDITLINE)
  CMakeLists.txt:409 (MYSQL_CHECK_EDITLINE)

— Configuring incomplete, errors occurred!

 

该报错原因是未**安装ncurses-devel**,安装

#yum -y install ncurses-devel

 

删除CMakeCache.txt

 

locate  CMakeCache.txt                          #应用locate时
报错,试行命令updatedb

# rm -rf
/usr/local/src/cmake-2.8.8/Tests/Complex/Cache/CMakeCache.txt
# rm -rf
/usr/local/src/cmake-2.8.8/Tests/ComplexOneConfig/Cache/CMakeCache.txt
# rm -rf
/usr/local/src/cmake-2.8.8/Tests/ComplexRelativePaths/Cache/CMakeCache.txt
# rm -rf /usr/local/src/mysql-5.6.25/CMakeCache.txt

 

下一场再次编写翻译

 

You may also like...

发表评论

电子邮件地址不会被公开。 必填项已用*标注

网站地图xml地图