mysql5.5的安装配置选项

安装依赖:libncurses-dev  ncurses-devel

创建用户:groupadd mysql;   useradd mysql -s /sbin/nologin -M -g mysql

编译安装:

tar -zxf mysql-5.5.xxx.tar.gz

cd mysql-5.5.xxx

cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql-5.5.xx \

-DMYSQL_DATADIR=/usr/local/mysql-5.5.xx/data \

-DMYSQL_UNIX_ADDR=/usr/local/mysql-5.5.xx/tmp/mysql.sock \

-DDEFAULT_CHARSET=utf8 \

-DDEFAULT_COLLATION=utf8_general_ci \

-DEXTRA_CHARSETS=gbk,gb2312,utf8,ascii \

-DENABLED_LOCAL_INFILE=ON \

-DWITH_INNOBASE_STORAGE_ENGINE=1 \

-DWITH_FEDERATER_STORAGE_ENGINE=1 \

-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \

-DWITH_EXAMPLE_STORAGE_ENGINE=1 \

-DWITH_PARTITION_STORAGE_ENGINE=1 \

-DWITH_FAST_MUTEXES=1 \

-DWITH_ZLIB=bundled \

-DENABLED_LOCAL_INFILE=1 \

-DWITH_READLINE=1

-DWITH_EMBEDDED_SERVER=1 \

-DWITH_DEBUG=0

make -j 8 && make install

ln -s /application/mysql-5.5.xx/ /application/mysql

cp /path/to/mysql-5.5.xx/support-files/my-large.cnf /etc/my.cnf

echo ‘export PATH=/application/mysql/bin:$PATH‘ >> /etc/profile

tail -l /etc/profile

source /etc/profile

echo $PATH

mkdir -p /application/mysql/data

chown -R mysql:mysql /application/mysql

chmod -R 1777 /tmp

/application/mysql/scripts/mysql_install_db --basedir=/application/mysql --datadir=/application/mysql/data/ --user=mysql

<code>

Installing MySQL system tables...

151013 16:14:18 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.

OK

Filling help tables...

151013 16:14:20 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.

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:

/application/mysql/bin/mysqladmin -u root password ‘new-password‘

/application/mysql/bin/mysqladmin -u root -h fangsempire-qa password ‘new-password‘

Alternatively you can run:

/application/mysql/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 /application/mysql ; /application/mysql/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl

cd /application/mysql/mysql-test ; perl mysql-test-run.pl

Please report any problems at http://bugs.mysql.com/

</code>

Access denied for user ‘root‘@‘localhost‘(using password:NO)问题解决:

pkill mysqld

lsof -i:3306

rm -rf /application/mysql/data/*

/application/mysql/scripts/mysql_install_db --basedir=/application/mysql --datadir=/application/mysql/data/ --user=mysql

drop database test;

select user,host from mysql.user;

delete from mysql.user where user=‘‘;

delete from mysql.user where host=‘hostname‘;

delete from mysql.user;

grant all privileges on *.* to ‘system‘@‘localhost‘ identified by ‘password‘ with grant option;

flush privileges;

select user,host from mysql.user;

/application/mysql/bin/mysqladmin -u root password ‘password‘

时间: 2024-10-12 04:38:08

mysql5.5的安装配置选项的相关文章

CentOS7服务器中apache、php7以及mysql5.7的安装配置代码

CentOS7服务器中apache.php7以及mysql5.7的配置代码如下所示: yum upgradeyum install net-tools 安装apache (http://m.8682222.com)关闭SELinux编辑器打开 etc/selinux/config 文件,找到 SELINUX=enforcing 字段,将其改成 SELINUX=disabled ,并重启设备.yum -y install httpd mod_ssl配置防火墙firewall-cmd --perma

centos7.2 环境下 mysql-5.1.73 安装配置

安装mysql,安装前准备 如果mysql用户不存在,那么添加mysql用户 groupadd mysql useradd -g mysql mysql mysql编译安装 tar -zxvf mysql-5.1.73.tar.gz cd mysql-5.1.73 yum install ncurses ncurses-devel ./configure '--prefix=/usr/local/mysql' '--without-debug' '--with-charset=utf8' '--

1.MySQL5.7.19 安装配置踩过的坑

这篇文章主要是分享 安装MySQL时遇到的一些问题,以及解决方法. 第一步:下载MySQL 下载地址:https://dev.mysql.com/downloads/mysql/5.1.html#downloads 我下载的是5.7.19版本,下载地址里面也只有解压版,下载后再进行环境变量的配置就可以. 2.解压并安装Mysql5.7.19 (1)将下载的包解压到指定的路径,自己可以指定路径,我直接解压到了D盘,解压到了                         D:\mysq的目录下.则

Mysql-5.7.21安装配置

搞开发多年,其实MySql前前后后安装配置了无数次,但是每次都需要到网上搜教程,折腾半天才搞定,这次索性把整个过程全部记录下来,以便以后查阅. 下载 到MySql官网,导航找到DOWNLOADS>>Community>>MySQL Community Server页面,也可以直接点击此处,选择相应的Mysql版本的zip包,我这里是mysql-5.7.21-winx64.zip. 安装配置 下载好压缩包之后直接解压到将要存放的目录: 在根目录新建my.ini文件(并没有所谓的my-

Mysql5.7.14安装配置

Mysql5.7.14免安装版配置方法: 运行 在命令行中输入 mysqld install mysql5.7 安装成功后,启动mysql 在命令行中输入 net start mysql5.7 这个时候会出现服务无法启动的问题,原因是因为oracle把data目录给删除了 我们可以用 mysqld  --initialize 先初始化 data目录,再启动,就可以了

mysql5.7的安装配置

mysql官方下载地址: https://dev.mysql.com/downloads/mysql/ 安装步骤: 1.下载tar包到opt目录下 wget https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.27-el7-x86_64.tar.gz /opt/ 2.查看机器是否安装过其他版本的mysql # 卸载了其他的mysql版本 [[email protected]-minion2 opt]# rpm -qa|grep mariadb

mysql5.5的安装配置

1.wget http://120.52.72.23/cdn.mysql.com/c3pr90ntc0td//Downloads/MySQL-5.5/mysql-5.5.50-linux2.6-x86_64.tar.gz 2.tar -xvf mysql-5.5.50-linux2.6-x86_64.tar.gz -C /usr/local/ 3.ln -s mysql-5.5.50-linux2.6-x86_64/ mysql 4.groupadd -r -g 306 mysql       

mysql5.7.17安装配置

一.创建msql用户 #添加运行mysql的用户,禁止该用户登录系统 [[email protected] ~]# useradd  mysql -s /sbin/nologin 二.创建相关目录 #创建目录 [[email protected] ~]# mkdir /data/mysql/mysql3306/{conf,data,logs,tmp} -p #修改目录权限 [[email protected] ~]# chown -R mysql.mysql /data/mysql 三.创建配置

mysql-5.7.18-winx64 压缩版安装配置

mysql-5.7.18-winx64 安装配置 一.配置my.cnf 1.解压mysql-5.7.18-winx64.zip到E盘根目录下 2.写my.cnf文件 创建my-small.cnf文件放到Mysql根目录下面. [client] default-character-set=utf8 [mysql] default-character-set=utf8 [mysqld] port=3306 basedir=E:/mysql-5.7.18-winx64 datadir=E:/mysql