- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
使用默认值安装,我已经安装了mysql 5.7.13。使用此处的说明从源代码获取:https://dev.mysql.com/doc/refman/5.7/en/installing-source-distribution.html
然后我按照此处的说明初始化了数据目录:https://dev.mysql.com/doc/refman/5.7/en/data-directory-initialization.html
这安装在我的 ubuntu 14.04 服务器上。
使用这个启动服务器:
bin/mysqld_safe --user=mysql &
告诉我检查日志文件 error.log。Error.log 说
2016-07-15T22:16:43.460297Z mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
2016-07-15T22:16:43.862401Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see$
2016-07-15T22:16:43.863013Z 0 [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider$
2016-07-15T22:16:43.863502Z 0 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.7.13) starting as process 1996 ...
2016-07-15T22:16:43.864532Z 0 [ERROR] Can't find error-message file '/usr/share/mysql/errmsg.sys'. Check error-message file location and 'lc-messages-dir' c$
2016-07-15T22:16:43.893029Z 0 [Note] InnoDB: PUNCH HOLE support available
2016-07-15T22:16:43.893057Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-07-15T22:16:43.893080Z 0 [Note] InnoDB: Uses event mutexes
2016-07-15T22:16:43.893084Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2016-07-15T22:16:43.893086Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-07-15T22:16:43.894664Z 0 [Note] InnoDB: Number of pools: 1
2016-07-15T22:16:43.902772Z 0 [Note] InnoDB: Using CPU crc32 instructions
2016-07-15T22:16:43.908310Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2016-07-15T22:16:43.932802Z 0 [Note] InnoDB: Completed initialization of buffer pool
2016-07-15T22:16:43.942146Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of se$
2016-07-15T22:16:43.952791Z 0 [Note] InnoDB: The first innodb_system data file 'ibdata1' did not exist. A new tablespace will be created!
2016-07-15T22:16:43.952931Z 0 [Note] InnoDB: Setting file './ibdata1' size to 12 MB. Physically writing the file full; Please wait ...
2016-07-15T22:16:44.015448Z 0 [Note] InnoDB: File './ibdata1' size is now 12 MB.
2016-07-15T22:16:44.015683Z 0 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2016-07-15T22:16:44.197808Z 0 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2016-07-15T22:16:44.296354Z 0 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2016-07-15T22:16:44.296394Z 0 [Warning] InnoDB: New log files created, LSN=45790
2016-07-15T22:16:44.296404Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2016-07-15T22:16:44.296422Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2016-07-15T22:16:44.319575Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2016-07-15T22:16:44.319763Z 0 [Note] InnoDB: Doublewrite buffer not found: creating new
2016-07-15T22:16:44.340836Z 0 [Note] InnoDB: Doublewrite buffer created
2016-07-15T22:16:44.345684Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2016-07-15T22:16:44.345696Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2016-07-15T22:16:44.345779Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2016-07-15T22:16:44.353886Z 0 [Note] InnoDB: Foreign key constraint system tables created
2016-07-15T22:16:44.353917Z 0 [Note] InnoDB: Creating tablespace and datafile system tables.
2016-07-15T22:16:44.354865Z 0 [Note] InnoDB: Tablespace and datafile system tables created.
2016-07-15T22:16:44.354886Z 0 [Note] InnoDB: Creating sys_virtual system tables.
2016-07-15T22:16:44.355467Z 0 [Note] InnoDB: sys_virtual table created
2016-07-15T22:16:44.356452Z 0 [Note] InnoDB: Waiting for purge to start
2016-07-15T22:16:44.406828Z 0 [Note] InnoDB: 5.7.13 started; log sequence number 0
2016-07-15T22:16:44.406972Z 0 [Note] Plugin 'FEDERATED' is disabled.
mysqld: Unknown error 1146
2016-07-15T22:16:44.408277Z 0 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2016-07-15T22:16:44.408377Z 0 [ERROR] unknown variable 'key_buffer=16M'
2016-07-15T22:16:44.408381Z 0 [ERROR] Aborting
2016-07-15T22:16:44.408393Z 0 [Note] Binlog end
2016-07-15T22:16:44.408425Z 0 [Note] Shutting down plugin 'ngram'
2016-07-15T22:16:44.408428Z 0 [Note] Shutting down plugin 'partition'
2016-07-15T22:16:44.408430Z 0 [Note] Shutting down plugin 'BLACKHOLE'
2016-07-15T22:16:44.408433Z 0 [Note] Shutting down plugin 'ARCHIVE'
2016-07-15T22:16:44.408435Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2016-07-15T22:16:44.408477Z 0 [Note] Shutting down plugin 'MEMORY'
2016-07-15T22:16:44.408480Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
2016-07-15T22:16:44.408482Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2016-07-15T22:16:44.408483Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2016-07-15T22:16:44.408485Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2016-07-15T22:16:44.408486Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2016-07-15T22:16:44.408488Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2016-07-15T22:16:44.408490Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2016-07-15T22:16:44.408491Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2016-07-15T22:16:44.408493Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2016-07-15T22:16:44.408494Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2016-07-15T22:16:44.408496Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2016-07-15T22:16:44.408497Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2016-07-15T22:16:44.408499Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2016-07-15T22:16:44.408500Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2016-07-15T22:16:44.408502Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2016-07-15T22:16:44.408503Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2016-07-15T22:16:44.408505Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
2016-07-15T22:16:44.408506Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
2016-07-15T22:16:44.408508Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2016-07-15T22:16:44.408510Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2016-07-15T22:16:44.408511Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2016-07-15T22:16:44.408513Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2016-07-15T22:16:44.408514Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2016-07-15T22:16:44.408516Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2016-07-15T22:16:44.408517Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
2016-07-15T22:16:44.408519Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2016-07-15T22:16:44.408520Z 0 [Note] Shutting down plugin 'INNODB_CMP'
2016-07-15T22:16:44.408522Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2016-07-15T22:16:44.408523Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
2016-07-15T22:16:44.408525Z 0 [Note] Shutting down plugin 'INNODB_TRX'
2016-07-15T22:16:44.408526Z 0 [Note] Shutting down plugin 'InnoDB'
2016-07-15T22:16:44.408548Z 0 [Note] InnoDB: FTS optimize thread exiting.
并启动 mysql_updgrade
bin/mysql_upgrade
我收到一条错误消息:
mysql_upgrade: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) while connecting to the MySQL server Upgrade process encountered error and will not continue.
问题是 sock 文件在任何地方都不存在。它只是不存在。我使用 find
和 locate
进行了搜索,我 100% 确定它不在我的服务器上。查看/etc/mysql/my.cnf
my.cnf
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
# Here is entries for some specific programs
# The following values assume you have at least 32M ram
# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld]
#
# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
#
# * Fine Tuning
#
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover = BACKUP
#max_connections = 100
#table_cache = 64
#thread_concurrency = 10
#
# * Query Cache Configuration
#
query_cache_limit = 1M
query_cache_size = 16M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
#general_log_file = /var/log/mysql/mysql.log
#general_log = 1
#
# Error log - should be very few entries.
#
log_error = /var/log/mysql/error.log
#
# Here you can see queries with especially long duration
#log_slow_queries = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
# other settings you may need to change.
#server-id = 1
#log_bin = /var/log/mysql/mysql-bin.log
expire_logs_days = 10
max_binlog_size = 100M
#binlog_do_db = include_database_name
#binlog_ignore_db = include_database_name
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
[isamchk]
key_buffer = 16M
#
# * IMPORTANT: Additional settings that can override those from this file!
# The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/
[isamchk]
key_buffer = 16M
#
# * IMPORTANT: Additional settings that can override those from this file!
# The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/
这些默认值都不正确。所以我更改了我的 my.cnf 文件以适本地匹配所有内容。由于 mySQL 安装在/usr/local/mysql 中。
修改后的 my.cnf 文件:
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
#host = 127.0.0.1
port = 3306
socket = /tmp/mysql.sock
# Here is entries for some specific programs
# The following values assume you have at least 32M ram
# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket = /tmp/mysql.sock
nice = 0
[mysqld]
#
# * Basic Settings
#
user = mysql
pid-file = /tmp/mysqld.pid
socket = /tmp/mysqld.sock
port = 3306
basedir = /usr/local/mysql
datadir = /usr/local/mysql/data
tmpdir = /tmp
lc-messages-dir = /usr/local/mysql/share
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
#
# * Fine Tuning
#
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover = BACKUP
#max_connections = 100
#table_cache = 64
#thread_concurrency = 10
#
# * Query Cache Configuration
#
query_cache_limit = 1M
query_cache_size = 16M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
#general_log_file = /var/log/mysql/mysql.log
#general_log = 1
#
# Error log - should be very few entries.
#
log_error = /usr/local/mysql/data/error.log
#
# Here you can see queries with especially long duration
#log_slow_queries = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
# other settings you may need to change.
#server-id = 1
#log_bin = /var/log/mysql/mysql-bin.log
expire_logs_days = 10
max_binlog_size = 100M
#binlog_do_db = include_database_name
#binlog_ignore_db = include_database_name
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
[isamchk]
key_buffer = 16M
#
# * IMPORTANT: Additional settings that can override those from this file!
# The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/
现在,我仍然遇到同样的问题。根本就没有创建套接字文件,无论我说 my.cnf 位于哪个文件夹中以及具有哪些权限。我尝试过自己创建文件,但结果相同。
是的,我已经确定 my.cnf 是 mySQL 的默认文件。该端口在 iptables 中打开,并且 mySQL 用户确实拥有/访问 mysql 配置将其定向到的所有文件。
我在安装了 apache2 的 Ubuntu 14.04 服务器上运行它。服务器运行在 Virtual Box 中。我正在通过 Putty 访问服务器。
我已经坚持了好几天,在尝试了我可以在本网站和其他网站上的其他问题中找到的所有解决方案后,现在完全不知道该怎么做。我可以提供帮助回答这个问题所需的任何和所有信息/日志。
在此问题上提供任何帮助,我将不胜感激!
最佳答案
我解决了这个问题。 error.log 中有一行与我忽略的 key 缓冲区大小有关。注释掉这两行后:
#myisam-recover = BACKUP
#key_buffer = 16M
我删除了默认数据目录并重新初始化了数据目录。然后mysql就可以正常启动了。
关于mySQL 5.7.13 源安装不创建 mysqld.sock,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38406020/
语境 我正在将一个旧的 php 电子商务网站变成一个用 gatsby.js 构建的静态网站。 我将所有产品元数据放入单独的 .json 文件(每个产品一个),并且我能够使用 json 和文件转换器插件
我曾经能够使用三指向上滚动在源/标题之间切换。自从升级到 Lion 后,我只进行常规滚动。有没有办法恢复该功能? Aka,当我像以前那样向上/向下滚动时,它不会跳到对应的位置。 更新 Apple 在
我有一个包含复选框输入的克隆元素。当克隆的元素未被选中时,我需要也取消选中源元素。有没有办法在 jQuery 中做到这一点?或者我是否以错误的方式处理这个问题(即使用clone())?我应该提到我的问
我有一个类,其中有两个 JSpinner 对象,x 和 y。我有一个更改监听器,它已添加到两者中。有人可以告诉我如何实现我的更改监听器,以便监听器可以区分两个对象之间的区别。例如伪代码: if(sou
我正在编写涉及 for 循环的代码,该循环在每个索引处进行计算。 这些计算中的最小值存储在一个变量中,我在程序末尾使用 MPI_Allreduce 来确定所有进程的全局最小值。 但是,我需要一种方法来
我需要在一个 Android 项目中创建一个 map View ,我从服务器获取自定义 map 图 block PNG。有人知道实现此类功能的简单许可 API 吗? 最佳答案 我使用了 OsmDroi
因为我必须创建一个可以更改图像 (src/background-url) 的函数。我想知道如何识别标签以及它是使用 src 还是 url 来访问图像。 让我们说 早些时候我写了一个可以
当我使用源 map 浏览器 https://github.com/danvk/source-map-explorer要检查捆绑包中的内容,我得到以下输出: D:\projects\angular\mT
我正在为客户将 Windev 应用程序移植到 Objective-C。出于显而易见的原因,使用以前的源代码会更简单。 不幸的是,它是加密的,我需要 EDI 才能看到它;完整版的 Windev 太贵了(
我有一个简单的视频播放器,它使用 WPF MediaElement 播放一系列视频。这些视频一起形成一个围绕静止图像移动的连续电影。在每个视频结束时,运动会卡住在当前播放视频的最后一帧。当我按下一个按
我需要更改 openlayer 的图层源(使用 open weather api)。目前我正在使用以下代码但没有成功。 let layer = this.map.getLayers().getArra
我正在尝试在 /dev/random 的机器上运行代码不会很快填满,我正在尝试使用的 Java 程序因缺少随机数而挂起。/dev/urandom产生“不太好”的随机数,但不会阻塞,对于这种情况,我宁愿
我需要 Yocto 项目的源代码包。我已经拥有整个项目的所有资源,但它们还包括开发工具。 我想有一种方法来生成将为目标图像构建的所有包的(修补的)源。因此,例如,如果目标图像包含 busybox,我想
如何对入侵者隐藏 iFrame src 假设我正在流式传输我的网络摄像头或我的电脑屏幕,这是 iframe 代码: 并且我不希望它在大多数浏览器上显示页面源中的流 URL 和检查功能! 这意
是否可以进入 Qt 源,例如qmainwindow.cpp,在 Qt Creator 中?目前我正在看到反汇编,但最好能看到源代码。 最佳答案 当然!但您可能必须首先: 转到 $QT_HOME/qt
我正在尝试创建一个包含很少动漫剧集的简单网站。我有一个关于 javascript 的问题。如何通过单击我的链接之一来更改视频源?我明白,我必须使用事件监听器,只需更改 取决于我点击的链接,但我不太擅长
我有一个带有 BindingSouce 的 DevExpress GridControl。我想清除 BindingSource 并用新数据填充它。我这样做: var list = new List()
当单击提交输入按钮时,我尝试将其他参数(选定复选框的列表)传递到服务器处理的 DataTables 表#my_table: 这可能意味着我必须将 my_table.sAjaxSource 设置为后端脚
(好吧,别对我大喊大叫,这里已经很晚了:)) 我正在研究 delta diff 工具(命令行工具或组件,只要我可以从 Delphi 2010 调用它们就可以了) 我有这个项目,我将文件上传到服务器,我
我需要解析 Yahoo Weather RSS feed 中的某个位置,例如 http://weather.yahooapis.com/forecastrss?w=44418&u=c例如,获取最高、最
我是一名优秀的程序员,十分优秀!