ucloud mysql
[root@--- bin]# yum install mysql-server
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
Package mysql-server is obsoleted by mysql-community-server, trying to install mysql-community-server-5.6.-.el7.x86_64 instead
Resolving Dependencies
--> Running transaction check
---> Package mysql-community-server.x86_64 :5.6.-.el7 will be installed
--> Processing Dependency: mysql-community-common(x86-) = 5.6.-.el7 for package: mysql-community-server-5.6.-.el7.x86_64
--> Processing Dependency: mysql-community-client(x86-) >= 5.6. for package: mysql-community-server-5.6.-.el7.x86_64
--> Processing Dependency: systemd for package: mysql-community-server-5.6.-.el7.x86_64
--> Processing Dependency: systemd for package: mysql-community-server-5.6.-.el7.x86_64
--> Processing Dependency: perl(DBI) for package: mysql-community-server-5.6.-.el7.x86_64
--> Processing Dependency: libstdc++.so.(GLIBCXX_3.4.15)(64bit) for package: mysql-community-server-5.6.-.el7.x86_64
--> Processing Dependency: libnuma.so.(libnuma_1.)(64bit) for package: mysql-community-server-5.6.-.el7.x86_64
--> Processing Dependency: libnuma.so.(libnuma_1.)(64bit) for package: mysql-community-server-5.6.-.el7.x86_64
--> Processing Dependency: libc.so.(GLIBC_2.)(64bit) for package: mysql-community-server-5.6.-.el7.x86_64
--> Processing Dependency: libnuma.so.()(64bit) for package: mysql-community-server-5.6.-.el7.x86_64
--> Running transaction check
---> Package mysql-community-client.x86_64 :5.6.-.el7 will be installed
--> Processing Dependency: mysql-community-libs(x86-) >= 5.6. for package: mysql-community-client-5.6.-.el7.x86_64
--> Processing Dependency: libc.so.(GLIBC_2.)(64bit) for package: mysql-community-client-5.6.-.el7.x86_64
---> Package mysql-community-common.x86_64 :5.6.-.el7 will be installed
---> Package mysql-community-server.x86_64 :5.6.-.el7 will be installed
--> Processing Dependency: systemd for package: mysql-community-server-5.6.-.el7.x86_64
--> Processing Dependency: systemd for package: mysql-community-server-5.6.-.el7.x86_64
--> Processing Dependency: libstdc++.so.(GLIBCXX_3.4.15)(64bit) for package: mysql-community-server-5.6.-.el7.x86_64
--> Processing Dependency: libc.so.(GLIBC_2.)(64bit) for package: mysql-community-server-5.6.-.el7.x86_64
---> Package numactl.x86_64 :2.0.-.el6 will be installed
---> Package perl-DBI.x86_64 :1.609-.el6 will be installed
--> Running transaction check
---> Package mysql-community-client.x86_64 :5.6.-.el7 will be installed
--> Processing Dependency: libc.so.(GLIBC_2.)(64bit) for package: mysql-community-client-5.6.-.el7.x86_64
---> Package mysql-community-libs.x86_64 :5.6.-.el7 will be installed
--> Processing Dependency: libc.so.(GLIBC_2.)(64bit) for package: mysql-community-libs-5.6.-.el7.x86_64
---> Package mysql-community-server.x86_64 :5.6.-.el7 will be installed
--> Processing Dependency: systemd for package: mysql-community-server-5.6.-.el7.x86_64
--> Processing Dependency: systemd for package: mysql-community-server-5.6.-.el7.x86_64
--> Processing Dependency: libstdc++.so.(GLIBCXX_3.4.15)(64bit) for package: mysql-community-server-5.6.-.el7.x86_64
--> Processing Dependency: libc.so.(GLIBC_2.)(64bit) for package: mysql-community-server-5.6.-.el7.x86_64
--> Finished Dependency Resolution
Error: Package: mysql-community-client-5.6.-.el7.x86_64 (mysql56-community)
Requires: libc.so.(GLIBC_2.)(64bit)
Error: Package: mysql-community-libs-5.6.-.el7.x86_64 (mysql56-community)
Requires: libc.so.(GLIBC_2.)(64bit)
Error: Package: mysql-community-server-5.6.-.el7.x86_64 (mysql56-community)
Requires: libc.so.(GLIBC_2.)(64bit)
Error: Package: mysql-community-server-5.6.-.el7.x86_64 (mysql56-community)
Requires: systemd
Error: Package: mysql-community-server-5.6.-.el7.x86_64 (mysql56-community)
Requires: libstdc++.so.(GLIBCXX_3.4.15)(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
[root@--- bin]#
shell>tar -zxvf mysql-5.7.-linux-glibc2.-x86_64.tar.gz -C /usr/local/
shell>mv mysql-5.7.-linux-glibc2.-x86_64/ mysql
shell> groupadd mysql
shell> useradd -r -g mysql -s /bin/false mysql
shell> cd /usr/local
shell> cd mysql
shell> mkdir mysql-files
shell> chmod mysql-files
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> bin/mysqld --initialize --user=mysql //这个命令执行完之后会出现默认密码如下图:
[root@--- mysql]# bin/mysqld --initialize -user=mysql
bin/mysqld: error while loading shared libraries: libnuma.so.: cannot open shared object file: No such file or directory
solution(http://blog.csdn.net/sbwfgihc/article/details/16880813):
[root@--- bin]# ./mysqld --initialize --user=mysql
./mysqld: error while loading shared libraries: libnuma.so.: cannot open shared object file: No such file or directory
[root@--- bin]#
[root@--- bin]#
[root@--- bin]#
[root@--- bin]# yum remove libnuma.so.
Loaded plugins: fastestmirror
Setting up Remove Process
No Match for argument: libnuma.so.
Loading mirror speeds from cached hostfile
No Packages marked for removal
[root@--- bin]#
[root@--- bin]#
[root@--- bin]# yum install numactl.x86_64
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package numactl.x86_64 :2.0.-.el6 will be installed
--> Finished Dependency Resolution Dependencies Resolved ==============================================================================================================================================================================================
Package Arch Version Repository Size
==============================================================================================================================================================================================
Installing:
numactl x86_64 2.0.-.el6 base k Transaction Summary
==============================================================================================================================================================================================
Install Package(s) Total download size: k
Installed size: k
Is this ok [y/N]: y
Downloading Packages:
numactl-2.0.-.el6.x86_64.rpm | kB :
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : numactl-2.0.-.el6.x86_64 /
Verifying : numactl-2.0.-.el6.x86_64 / Installed:
numactl.x86_64 :2.0.-.el6 Complete!
[root@--- bin]#
[root@--- bin]#
[root@--- bin]#
[root@--- bin]# ./mysqld --initialize --user=mysql
--06T05::.780808Z [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
--06T05::.442494Z [Warning] InnoDB: New log files created, LSN=
--06T05::.641425Z [Warning] InnoDB: Creating foreign key constraint system tables.
--06T05::.709560Z [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 4bba7d6e-f2a6-11e7-96fb-525400cb5213.
--06T05::.711979Z [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
--06T05::.713290Z [Note] A temporary password is generated for root@localhost: L9&X;A(t+6ju
[root@--- bin]#
[root@--- bin]# ./mysql_ssl_rsa_setup
Generating a bit RSA private key
..................................................................................................................................................................+++
........................+++
writing new private key to 'ca-key.pem'
-----
Generating a bit RSA private key
........................................................................................................................................................+++
..........................................................................................+++
writing new private key to 'server-key.pem'
-----
Generating a bit RSA private key
......+++
.......................................................................+++
writing new private key to 'client-key.pem'
-----
[root@--- bin]#
[root@--- mysql]# ls -ltr
total
-rw-r--r-- mysql mysql Sep : README
-rw-r--r-- mysql mysql Sep : COPYING
drwxr-xr-x mysql mysql Jan : include
drwxr-xr-x mysql mysql Jan : man
drwxr-xr-x mysql mysql Jan : bin
drwxr-xr-x mysql mysql Jan : lib
drwxr-xr-x mysql mysql Jan : support-files
drwxr-xr-x mysql mysql Jan : share
drwxr-xr-x mysql mysql Jan : docs
drwxr-x--- mysql mysql Jan : mysql-files
drwxr-xr-x mysql mysql Jan : data
[root@--- mysql]#
[root@--- mysql]# chown -R root .
[root@--- mysql]# ls -ltr
total
-rw-r--r-- root mysql Sep : README
-rw-r--r-- root mysql Sep : COPYING
drwxr-xr-x root mysql Jan : include
drwxr-xr-x root mysql Jan : man
drwxr-xr-x root mysql Jan : bin
drwxr-xr-x root mysql Jan : lib
drwxr-xr-x root mysql Jan : support-files
drwxr-xr-x root mysql Jan : share
drwxr-xr-x root mysql Jan : docs
drwxr-x--- root mysql Jan : mysql-files
drwxr-xr-x root mysql Jan : data
[root@--- mysql]#
[root@--- mysql]# bin/mysqld_safe --user=mysql &
[]
[root@--- mysql]# Logging to '/usr/local/mysql/data/10-23-52-37.err'.
--06T06::.479595Z mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
--06T06::.218467Z mysqld_safe mysqld from pid file /usr/local/mysql/data/---.pid ended
^C
[]+ Done bin/mysqld_safe --user=mysql
[root@--- mysql]#
shell> bin/mysql_ssl_rsa_setup # MySQL 5.7. and up
shell> chown -R root .
shell>bin/mysqld_safe --user=mysql & //(坑)执行这步的是为了生成pid,当你看到以.pid ended结尾,就可以ctrl+c,而且这一步mysql已经启动了,你需要执行ps -ef|grep mysqld,然后将mysql进程kill掉,然后在进行一下命令
shell>cd ..
shell> sudo support-files/mysql.server start //开启mysql,他会报错,需要修改/etc/my.cnf下的socket=/tmp/mysql.sock,修改完成后再次启动mysql
shell> cp support-files/mysql.server /etc/init.d/mysql.server//设置开机启动
[root@--- mysql]# support-files/mysql.server start
Starting MySQL.Logging to '/usr/local/mysql/data/10-23-52-37.err'.
ERROR! The server quit without updating PID file (/usr/local/mysql/data/---.pid).
[root@--- mysql]#
[root@--- mysql]#
[root@--- mysql]# chown -R mysql.mysql /usr/local/mysql/data/
[root@--- mysql]#
[root@--- mysql]#
[root@--- mysql]# pwd
/usr/local/mysql
[root@--- mysql]#
[root@--- mysql]# support-files/mysql.server start
Starting MySQL.Logging to '/usr/local/mysql/data/10-23-52-37.err'.
SUCCESS!
[root@--- mysql]#
[root@--- bin]# ./mysql
ERROR (): Access denied for user 'root'@'localhost' (using password: NO)
[root@--- bin]# ./mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is
Server version: 5.7. Copyright (c) , , Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> status
ERROR (HY000): You must reset your password using ALTER USER statement before executing this statement.
mysql>
mysql>
mysql>
mysql> set PASSWORD=PASSWORD('123qwe!@#QWE')
-> ;
Query OK, rows affected, warning (0.01 sec) mysql>
http://blog.csdn.net/Suubyy/article/details/78274070?locationNum=8&fps=1
ucloud mysql的更多相关文章
- 叶金荣:MySQL通用优化技巧
转自:http://mp.weixin.qq.com/s?__biz=MjM5NDE0MjI4MA==&mid=208777870&idx=1&sn=6efddd6283e4d ...
- 国内云存储对比: 阿里云、腾讯云、Ucloud、首都在线
阿里云的数据存储<http://www.aliyun.com/product/rds/> RDS — 关系型数据库服务(Relational Database Service,简称RDS) ...
- 通过云主机(网关机)远程登录内网mysql
国内的一些云主机平台(UCloud,阿里云,腾讯云等)走的都是网关机+内网机(即局域网)模式,网关机代理外网访问,不能直接连接内网机器.本文介绍通过远程登录云主机,并设置本地代理的方式,通过sqlyo ...
- mysql配置utf8_mb4
http://blog.csdn.net/u013145194/article/details/51527389 注:以上是转载,但我实际使用的时候,修改配置文件重启数据库,然后修改表的类型即可 20 ...
- UCloud首尔机房整体热迁移是这样炼成的
小结: 1.把两个机房在逻辑上变成一个机房: 2.新老机房的后端服务使用同一套 ZooKeeper,但是配置的却是不同的 IP: 3.UCloud内部服务所使用的数据库服务为MySQL, 内部MySQ ...
- MySQL复制异常大扫盲:快速溯源与排查错误全解
MySQL复制异常大扫盲:快速溯源与排查错误全解https://mp.weixin.qq.com/s/0Ic8BnUokyOj7m1YOrk1tA 作者介绍王松磊,现任职于UCloud,从事MySQL ...
- 五大常见的MySQL高可用方案
1. 概述 我们在考虑MySQL数据库的高可用的架构时,主要要考虑如下几方面: 1.1 如果数据库发生了宕机或者意外中断等故障,能尽快恢复数据库的可用性,尽可能的减少停机时间,保证业务不会因为数据 ...
- UCloud上LAMP小型站点搭建与測试
文件夹 介绍 LAMP环境搭建 打开UCloud防火墙 WordPress安装 应用測试 介绍 本篇博客旨在通过介绍搭建一个WordPress博客的过程介绍在UCloud的云主机(UHOST)上搭建单 ...
- MySQL远程连接不上的解决方法
这篇文章主要为大家详细介绍了MySQL远程连接不上的解决方法,具有一定的参考价值,感兴趣的小伙伴们可以参考一下 之前遇到过MySQL本地可以连接但是远程连不上的问题,没有记录,今天在云上新申请的服 ...
随机推荐
- hadoop任务监控页面namenode:50030(在hadoop配置中查找集群jobtracker的ip,访问50030)
公司集群,配置的hadoop.执行job,想去看看运行状态,却不知道jobtracker的机器ip: 查询hadoop 的jobtrack机器的ip,就查看文件conf/mapred-site.xml ...
- 数据结构---栈C语言实现
#include <stdio.h> #include <stdlib.h> #define uchar unsigned char #define uint unsigned ...
- ubuntu14.04下安装rubinius测试原生线程
因为CRuby(MRI)本身不支持原生多线程,所以想试一下其他ruby解释器实现对原生多线程的支持.于是安装rubinius折腾一下:) 在rubinius官网下载2.4.1源代码,然后驾轻就熟首先b ...
- linux下让irb实现代码自动补全的功能
我不知道其他系统上irb是否有此功能,但是在ubuntu上ruby2.1.2自带的irb默认是没有代码自动补全功能的,这多少让人觉得有所不便.其实加上也很简单,就是在irb里加载一个模块:requir ...
- VueJs(5)---V-bind指令
V-bind指令 一.概述 v-bind 主要用于属性绑定,比方你的class属性,style属性,value属性,href属性等等,只要是属性,就可以用v-bind指令进行绑定. 示例: < ...
- C++笔记018:构造函数的调用规则
原创笔记,转载请注明出处! 点击[关注],关注也是一种美德~ 一.默认构造函数 两个特殊的构造函数 1.默认无参构造函数 当类中没有定义构造函数时,编译器默认提供一个无参构造函数,并且其函数体为空 ...
- Java不走弯路教程(6.JDBC)
6.JDBC 在上一章,我们完成了MyDb数据库的简单的客户段调用.作为产品我们还封装了驱动程序,并且提供了统一的调用接口. 大家应该知道,市面上有多种数据库产品,比如Oracle,Mysql,DB2 ...
- myeclipse10破解
原本一直使用eclipse,但是写起web还是不太方便,由于idea使用不太顺手不太爱用.原来一直不能破解,今天迫不得已又拿起myeclipse仔细搞一番.下面是遇到的问题的总结. 不成功原因一:.原 ...
- IBM RAD 快捷键
Ctrl+1 快速修复(最经典的快捷键,就不用多说了) Ctrl+D: 删除当前行 Ctrl+Alt+↓ 复制当前行到下一行(复制增加) Ctrl+Alt+↑ ...
- java并发包分析之———concurrentHashMap
一.Map体系 Hashtable是JDK 5之前Map唯一线程安全的内置实现(Collections.synchronizedMap不算).Hashtable继承的是Dictionary(Hasht ...