sudo apt-get update
sudo apt-get upgrade
sudo apt-get install mysql-server mysql-client   #自动安装会装上5.7的client端,中间会弹出提示框输入root的密码

sudo groupadd mysql
sudo useradd -r -g mysql mysql


修改密码 
sudo /usr/bin/mysqladmin -u root password 登录
sudo /usr/bin/mysql -u root -p [可选数据库名称]

远程连接

GRANT ALL PRIVILEGES ON *.* TO 'root'@'10.10.40.54' IDENTIFIED BY '123456' WITH GRANT OPTION;

远程连接某表 : 创建username用户,可远程访问app数据库下user表,具有读、更新权限

grant select,update on app.user to username@‘%’ identified by '123456'; 

open_files_limit = 10240
back_log = 258
max_connections = 5000
max_connect_errors = 716
external-locking = FALSE
max_allowed_packet = 32M
sort_buffer_size = 8M
join_buffer_size = 1M
thread_cache_size = 300
query_cache_type=1
query_cache_size = 512M
query_cache_limit = 2M
query_cache_min_res_unit = 2k
thread_stack = 192K
tmp_table_size = 258M
max_heap_table_size = 258M
key_buffer_size = 512M
read_buffer_size = 4M
read_rnd_buffer_size = 16M
wait_timeout=1814400
bulk_insert_buffer_size = 64M
innodb_buffer_pool_size = 8000M
innodb_buffer_pool_instances=32
innodb_thread_concurrency = 8
innodb_flush_log_at_trx_commit = 2
innodb_log_buffer_size = 16M
innodb_log_file_size = 2048M
innodb_log_files_in_group = 3
innodb_max_dirty_pages_pct = 90
innodb_lock_wait_timeout = 120
innodb_read_io_threads = 16
innodb_write_io_threads = 16
innodb_io_capacity = 20000
innodb_io_capacity_max = 40000

查看连接数

show variables like '%max_connections%'
这时应该为5000,说明配置已生效

ubuntu安装mysql5.7的更多相关文章

  1. ubuntu安装mysql5.6

    安装mysql5.6在ubuntu上安装mysql5.6的版本 1.添加mysql5.6的源 sudo apt-get install software-properties-common sudo ...

  2. ubuntu 安装mysql5.7

    一.Windows mysql5.6 解压版 安装 关于widnows平台上的安装教程,可参考百度经验: 链接:https://jingyan.baidu.com/article/f3ad7d0ffc ...

  3. 转)Ubuntu安装mysql5.7

    主要参考http://blog.csdn.net/q894523017/article/details/50705392 包去官网下载,解压,安装步骤如下: 上文中有错误,正确如下: sudo dpk ...

  4. ubuntu 通过ppa源安装mysql5.6

    添加mysql5.6的源 sudo add-apt-repository -y ppa:ondrej/mysql-5.6 更新源 sudo apt-get update 安装mysql5.6 sudo ...

  5. 安装mysql5.5时候的报错解决办法:

    每次安装mysql5.5的时候总会报出一下错误: -- Could NOT find OpenSSL (missing: OPENSSL_LIBRARIES OPENSSL_INCLUDE_DIR) ...

  6. Ubuntu14.04编译安装mysql5.6.26

    Ubuntu14.04编译安装mysql5.6.26 (1)安装编译源码需要的包 sudo apt-get install make cmake gcc g++ bison libncurses5-d ...

  7. Ubuntu 安装 Mysql 5.6 数据库

    Ubuntu 安装 Mysql 5.6 数据库 1)下载: mysql-5.6.13-debian6.0-x86_64.deb http://dev.mysql.com/downloads/mirro ...

  8. Ubuntu18.04安装mysql5.7

    Ubuntu18.04安装mysql5.7 1.1安装 首先执行下面三条命令: # 安装mysql服务 sudo apt-get install mysql-server # 安装客户端 sudo a ...

  9. 安装mysql5.7与创建用户和远程登录授权

    环境:ubuntu18.04 参考文章:安装并远程登录授权:https://www.cnblogs.com/chancy/p/9444187.html 用户管理:https://www.cnblogs ...

随机推荐

  1. java基础之:匿名内部类应用例子一

    一:接口 package com.yeepay.sxf.testclassforinner; /** * 回调接口. * @author shangxiaofei * */ public interf ...

  2. Awesome Deep Vision

    Awesome Deep Vision  A curated list of deep learning resources for computer vision, inspired by awes ...

  3. faster rcnn test demo ---repaired for video input and save the image, label, score et al. into .mat format

    faster rcnn test demo ---repaired for video input and save the image, label, score et al. into .mat ...

  4. 【HACK】破解APK并注入自己的代码

    请不要去干坏事! 使用工具: APKTool 提醒:能够正常安装到手机上的APK都是带有签名的(不了解签名的可以百度),APK在破解重新打包后是已经不再拥有签名的,如果想要你破解后的APK能够正常运行 ...

  5. C/C++数组名与指针的区别详解

    1.数组名不是指针我们看下面的示例: #include <iostream> int main() { ]; char *pStr = str; cout << sizeof( ...

  6. add to svn ignore disabled

    The problem is that the folder is already under version control. Here's how I fix this type of probl ...

  7. C# toString()转换详细(转)

    文章转自:http://blog.csdn.net/xiaoguang44/article/details/6988418 字符型转换为字符串 // C 货币 2.5.ToString("C ...

  8. Android拍照、录像、录音代码范例

    <p>import java.io.File; import java.text.SimpleDateFormat; import java.util.Date; import andro ...

  9. Spring实战3:装配bean的进阶知识

    主要内容: Environments and profiles Conditional bean declaration 处理自动装配的歧义 bean的作用域 The Spring Expressio ...

  10. Nexus手动更新索引

    如果有耐心的话,完全可以通过在线更新索引的方式来做,但所消耗的时间较长,下面介绍一种简单.可行的方式来手动更新索引文件. 访问http://repo.maven.apache.org/maven2/. ...