出处:http://bugs.mysql.com/bug.php?id=18403

  1. Description:
  2. - I downloaded the binary file Standard 5.0.19 of Linux (non RPM package)”
  3. - Later, I executed the following commands (such as suggested in the documentation - http://dev.mysql.com/doc/refman/5.0/en/installing-binary.html):
  4.  
  5. shell> groupadd mysql
  6. shell> useradd -g mysql mysql
  7. shell> cd /usr/local
  8. shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
  9. shell> ln -s full-path-to-mysql-VERSION-OS mysql
  10. shell> cd mysql
  11. [root@... mysql]# scripts/mysql_install_db user=mysql
  12. [root@... mysql]# scripts/mysql_install_db --user=mysql
  13. Installing all prepared tables
  14. Fill help tables
  15.  
  16. To start mysqld at boot time you have to copy support-files/mysql.server
  17. to the right place for your system
  18.  
  19. PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
  20. To do so, start the server, then issue the following commands:
  21. ./bin/mysqladmin -u root password 'new-password'
  22. ./bin/mysqladmin -u root -h panthro.THUNDERA password 'new-password'
  23. See the manual for more instructions.
  24.  
  25. NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run
  26. the ./bin/mysql_fix_privilege_tables. Otherwise you will not be
  27. able to use the new GRANT command!
  28.  
  29. You can start the MySQL daemon with:
  30. cd . ; ./bin/mysqld_safe &
  31.  
  32. You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
  33. cd sql-bench ; perl run-all-tests
  34.  
  35. Please report any problems with the ./bin/mysqlbug script!
  36.  
  37. The latest information about MySQL is available on the web at
  38. http://www.mysql.com
  39. Support MySQL by buying support/licenses at https://order.mysql.com
  40.  
  41. [root@... mysql]# chown -R root .
  42. [root@... mysql]# chown -R mysql data
  43. [root@... mysql]# chgrp -R mysql .
  44. [root@... mysql]# bin/mysqld_safe --user=mysql &
  45. Starting mysqld daemon with databases from /var/lib/mysql
  46. STOPPING server from pid file /var/run/mysqld/mysqld.pid
  47. 060321 12:10:28 mysqld ended
  48.  
  49. [the pc was processing during some minutes, but I didn't got reply... So, I press <ENTER>]
  50. [1]+ Done bin/mysqld_safe –user=mysql
  51. [root@panthro mysql]#
  52.  
  53. The message created in log file is:
  54. 060321 12:12:21 mysqld started
  55. 060321 12:12:22 InnoDB: Database was not shut down normally!
  56. InnoDB: Starting crash recovery.
  57. InnoDB: Reading tablespace information from the .ibd files...
  58. InnoDB: Restoring possible half-written data pages from the doublewrite
  59. InnoDB: buffer...
  60. 060321 12:12:22 InnoDB: Starting log scan based on checkpoint at
  61. InnoDB: log sequence number 0 36808.
  62. InnoDB: Doing recovery: scanned up to log sequence number 0 43655
  63. 060321 12:12:22 InnoDB: Starting an apply batch of log records to the database...
  64. InnoDB: Progress in percents: 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
  65. InnoDB: Apply batch completed
  66. 060321 12:12:22 InnoDB: Started; log sequence number 0 43655
  67. 060321 12:12:22 [ERROR] /usr/local/mysql/bin/mysqld: Can't create/write to file '/var/run/mysqld/mysqld.pid' (Errcode: 13)
  68. 060321 12:12:22 [ERROR] Can't start server: can't create PID file: Permission denied
  69. 060321 12:12:22 mysqld ended
  70.  
  71. How to repeat:
  72. The bug can be repeated executing the same commands I executed. This is detailed in description of the problem above.
  73. Suggested fix:
  74. I don't know.... but I think it's related with any configuration PATH or permission.
  1. Thank you for a problem report. Please, send the results of the following commads:
  2.  
  3. ls -l /var/run
  4. ls -l /var/run/mysqld
  5.  
  6. I think, it is not a bug, but just a result of call with "-user=mysql"...
 
  1. Thank you for a problem report. Please, send the results of the following commads:
  2.  
  3. ls -l /var/run
  4. ls -l /var/run/mysqld
  5.  
  6. I think, it is not a bug, but just a result of call with "-user=mysql"...
[23 Mar 2006 17:47] Aquila Chaves
  1. The results of the commands are:
  2. ls -l /var/run
  3. ls -l /var/run/mysqld
  4.  
  5. [aquila@panthro ~]$ ls -l /var/run
  6. total 264
  7. srw-rw-rw- 1 root root 0 Mar 23 14:39 acpid.socket
  8. -rw-r--r-- 1 root root 5 Mar 23 14:39 atd.pid
  9. -rw-r--r-- 1 root root 5 Mar 23 14:38 auditd.pid
  10. drwxr-xr-x 2 root root 4096 Mar 23 14:39 console
  11. -rw-r--r-- 1 root root 5 Mar 23 14:39 crond.pid
  12. -rw-r--r-- 1 root root 5 Mar 23 14:39 cups-config-daemon.pid
  13. -rw-r--r-- 1 root root 5 Mar 23 14:39 cupsd.pid
  14. drwxr-xr-x 2 root root 4096 Mar 23 14:39 dbus
  15. -rw-r--r-- 1 root root 5 Mar 23 14:39 gdm.pid
  16. -rw-r--r-- 1 root root 5 Mar 23 14:39 gpm.pid
  17. -rw-r--r-- 1 root root 5 Mar 23 14:39 haldaemon.pid
  18. -rw------- 1 root root 5 Mar 23 14:38 klogd.pid
  19. drwx------ 2 root root 4096 May 16 2005 mdadm
  20. drwx------ 2 root root 4096 May 16 2005 mdmpd
  21. -rw-r--r-- 1 nobody root 5 Mar 23 14:39 mDNSResponder.pid
  22. -rw-r--r-- 1 root root 5 Mar 23 14:39 messagebus.pid
  23. drwxr-xr-x 2 root root 4096 Mar 21 10:51 mysqld
  24. drwxrwx--- 2 named named 4096 May 17 2005 named
  25. drwxrwxr-x 2 root root 4096 May 25 2005 netreport
  26. -rw-r--r-- 1 root root 5 Mar 23 14:39 nifd.pid
  27. drwxr-xr-x 2 root root 4096 May 30 2005 nscd
  28. drwxr-xr-x 2 root root 4096 Nov 2 2004 ppp
  29. drwxr-xr-x 2 pvm pvm 4096 Mar 8 2005 pvm3
  30. -rw-r--r-- 1 rpcuser rpcuser 5 Mar 23 14:38 rpc.statd.pid
  31. drwxr-xr-x 2 root root 4096 Apr 13 2005 saslauthd
  32. drwxrwxr-x 2 root screen 4096 Feb 23 13:48 screen
  33. -rw-r--r-- 1 root root 5 Mar 23 14:39 sshd.pid
  34. drwx------ 4 root root 4096 Jan 18 13:24 sudo
  35. -rw------- 1 root root 5 Mar 23 14:38 syslogd.pid
  36. drwx------ 2 root root 4096 May 23 2005 usb
  37. -rw-rw-r-- 1 root utmp 4992 Mar 23 14:40 utmp
  38. drwxr-xr-x 2 root root 4096 May 2 2005 winbindd
  39. -rw-r--r-- 1 root root 6 Mar 23 14:39 xfs.pid
  40.  
  41. and....
  42.  
  43. [aquila@panthro ~]$ ls -l /var/run/mysqld
  44. total 0
  45.  
  46. Any answer??
  47. Thank
[26 Apr 2006 15:08] Valeriy Kravchuk
  1. Sorry for a long delay with this bug report. Please, try to repeat with a newer version, 5.0.20a, and inform about the results.
[26 May 2006 23:00] Bugs System
  1. No feedback was provided for this bug for over a month, so it is
  2. being suspended automatically. If you are able to provide the
  3. information that was originally requested, please do so and change
  4. the status of the bug back to "Open".
[5 Jun 2006 19:16] Amit Chopra
  1. I downloads 5.0.22 for Linux (x86, glibc-2.2, "standard" is static, gcc), and I see the same problem. I followed the summary steps listed in the beginning of the INSTALL-BINARY file.
[4 Sep 2006 14:41] Radhakrishnan Mani
  1. shell> groupadd mysql
  2. shell> useradd -g mysql mysql
  3. shell> cd /usr/local
  4. shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
  5. shell> ln -s full-path-to-mysql-VERSION-OS mysql
  6. shell> cd mysql
  7. [root@... mysql]# scripts/mysql_install_db user=mysql
  8. [root@... mysql]# scripts/mysql_install_db --user=mysql
  9. Installing all prepared tables
  10. Fill help tables
  11.  
  12. To start mysqld at boot time you have to copy support-files/mysql.server
  13. to the right place for your system
  14.  
  15. PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
  16. To do so, start the server, then issue the following commands:
  17. ./bin/mysqladmin -u root password 'new-password'
  18. ./bin/mysqladmin -u root -h panthro.THUNDERA password 'new-password'
  19. See the manual for more instructions.
  20.  
  21. NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run
  22. the ./bin/mysql_fix_privilege_tables. Otherwise you will not be
  23. able to use the new GRANT command!
  24.  
  25. You can start the MySQL daemon with:
  26. cd . ; ./bin/mysqld_safe &
  27.  
  28. You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
  29. cd sql-bench ; perl run-all-tests
  30.  
  31. Please report any problems with the ./bin/mysqlbug script!
  32.  
  33. The latest information about MySQL is available on the web at
  34. http://www.mysql.com
  35. Support MySQL by buying support/licenses at https://order.mysql.com
  36.  
  37. [root@... mysql]# chown -R root .
  38. [root@... mysql]# chown -R mysql data
  39. [root@... mysql]# chgrp -R mysql .
  40. [root@... mysql]# bin/mysqld_safe --user=mysql &
  41. Starting mysqld daemon with databases from /var/lib/mysql
  42. STOPPING server from pid file /var/run/mysqld/mysqld.pid
  43. 060321 12:10:28 mysqld ended
  44.  
  45. [the pc was processing during some minutes, but I didn't got reply... So, I
  46. press <ENTER>]
  47. [1]+ Done bin/mysqld_safe –user=mysql
  48. [root@panthro mysql]#
  49.  
  50. The message created in log file is:
  51. 060321 12:12:21 mysqld started
  52. 060321 12:12:22 InnoDB: Database was not shut down normally!
  53. InnoDB: Starting crash recovery.
  54. InnoDB: Reading tablespace information from the .ibd files...
  55. InnoDB: Restoring possible half-written data pages from the doublewrite
  56. InnoDB: buffer...
  57. 060321 12:12:22 InnoDB: Starting log scan based on checkpoint at
  58. InnoDB: log sequence number 0 36808.
  59. InnoDB: Doing recovery: scanned up to log sequence number 0 43655
  60. 060321 12:12:22 InnoDB: Starting an apply batch of log records to the
  61. database...
  62. InnoDB: Progress in percents: 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
  63. 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
  64. 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
  65. 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
  66. InnoDB: Apply batch completed
  67. 060321 12:12:22 InnoDB: Started; log sequence number 0 43655
  68. 060321 12:12:22 [ERROR] /usr/local/mysql/bin/mysqld: Can't create/write to file
  69. '/var/run/mysqld/mysqld.pid' (Errcode: 13)
  70. 060321 12:12:22 [ERROR]
[16 Sep 2006 12:58] Valeriy Kravchuk
  1. All reporters:
  2.  
  3. Please, try to repeat again with latest 5.0.24a binaries. In case of same behaviour, please, send exact URL used to download.
[4 Oct 2006 4:03] matt mcglynn
  1. I have reproduced this problem using the mysql-5.0.24a.tar.gz source distribution, building on FreeBSD 5.4-RELEASE.
  2.  
  3. Specific problems:
  4. 1- `bin/mysql_install_db --user=mysql` reports no errors but does *not* create any files under /usr/local/mysql/var/mysql/ (meaning, the grants tables don't appear to exist)
  5.  
  6. 2- `bin/mysqld_safe` errors out:
  7. root@itx# bin/mysqld_safe
  8. Starting mysqld daemon with databases from /usr/local/mysql/var
  9. STOPPING server from pid file /usr/local/mysql/var/itx.sitefoundry.com.pid
  10. 061003 20:45:13 mysqld ended
  11.  
  12. The log under mysql/var/[hostname].err shows many lines of InnoDB messages, and then:
  13. 061003 20:51:09 [ERROR] /usr/local/mysql/libexec/mysqld: Can't create/write to file '/usr/local/mysql/var/itx.sitefoundry.com.pid' (Errcode: 13)
  14. 061003 20:51:09 [ERROR] Can't start server: can't create PID file: Permission denied
  15.  
  16. I've also tried passing mysqld_safe a different --pid-file with equally bad results:
  17.  
  18. 061003 20:54:52 [ERROR] /usr/local/mysql/libexec/mysqld: Can't create/write to file '/var/run/mysqld' (Errcode: 13)
  19. 061003 20:54:52 [ERROR] Can't start server: can't create PID file: Permission denied
  20. 061003 20:54:52 mysqld ended
[13 Oct 2006 15:12] Valeriy Kravchuk
  1. All reporters:
  2.  
  3. Please, try to repeat again with latest 5.0.26 binaries.
[17 Oct 2006 1:41] David Lee
  1. I had this same problem while restoring a database from a backup to a new server. The problem is as originally guessed ... that is the mysql us being run with -user=mysql ... but the /var/run/mysql directory is owned by root.
  2.  
  3. Do this
  4.  
  5. chown mysql /var/run/mysql
  6.  
  7. This solved my identical problem
[14 Nov 2006 0:00] Bugs System
  1. No feedback was provided for this bug for over a month, so it is
  2. being suspended automatically. If you are able to provide the
  3. information that was originally requested, please do so and change
  4. the status of the bug back to "Open".
[16 Nov 2006 10:02] [ name withheld ]
  1. I saw the same problem too and found that there was a my.cnf file already in /etc.So i knew that it was because i chose the standard packages when installing operating system, by doing this some files of mysql would be created.
  2. Then i replaced /etc/my.cnf with mysql-install-directory/support-files/my-large.cnf,and go on in the following steps:
  3. [root@... mysql]# scripts/mysql_install_db --user=mysql
  4. [root@... mysql]# chown -R root .
  5. [root@... mysql]# chown -R mysql data
  6. [root@... mysql]# chgrp -R mysql .
  7. [root@... mysql]# bin/mysqld_safe --user=mysql &
[16 Nov 2006 10:02] [ name withheld ]
  1. I saw the same problem too and found that there was a my.cnf file already in /etc.So i knew that it was because i chose the standard packages when installing operating system, by doing this some files of mysql would be created.
  2. Then i replaced /etc/my.cnf with mysql-install-directory/support-files/my-large.cnf,and go on in the following steps:
  3. [root@... mysql]# scripts/mysql_install_db --user=mysql
  4. [root@... mysql]# chown -R root .
  5. [root@... mysql]# chown -R mysql data
  6. [root@... mysql]# chgrp -R mysql .
  7. [root@... mysql]# bin/mysqld_safe --user=mysql &
[8 Mar 2009 13:38] khalid khalifa
  1. Hi, I had the same issue. What i did is instead of the commane line: shown -R mysql . i used this: shown mysql full-path-to-mysql-binaries
  2.  
  3. best luck.

Error with mysqld_safe的更多相关文章

  1. MySQL PXC构建一个新节点只需IST传输的方法

    需求场景:原有的pxc环境数据量已经比较大,新买的服务器要加入此集群中,如何让其用IST的方式传输,而不是SST. PXC传输数据有两种方式: IST: Incremental State Trans ...

  2. Ubuntu中安装DiscuzX2

    http://blog.csdn.net/kevin_ysu/article/details/7452938 一.Apache的安装 Apache作为一个功能强大的Web程序,自然是架建Web服务器的 ...

  3. 构建 MariaDB Galera Cluster 分布式数据库集群(二)

    MariaDB的安装 构建 MariaDB Galera Cluster之前,首先安装MariaDB,本文使用的版本是10.1 1.环境准备 主机: MariaDB01(192.168.56.102) ...

  4. 10 个 MySQL 经典错误【转】

    Top 1:Too many connections(连接数过多,导致连接不上数据库,业务无法正常进行) 问题还原 mysql> show variables like '%max_connec ...

  5. 【3.3】mysql中的Federated存储引擎,远程表,相当于sql server的linked server

    MySQL中针对不同的功能需求提供了不同的存储引擎.所谓的存储引擎也就是MySQL下特定接口的具体实现. FEDERATED是其中一个专门针对远程数据库的实现.一般情况下在本地数据库中建表会在数据库目 ...

  6. mysql小白系列_02 mysql源码安装标准化

    问题: 1.为什么数据目录和日志目录需要分开? 2.如何标准化配置多实例?(例如:一台物理主机上部署3306与3307两个实例) 3.详细描述MySQL编译安装的过程(截图安装步骤) 1.为什么数据目 ...

  7. Ubuntu mysql安装与使用

    Ubuntu 下安装 mysql 运行下面的shell代码 #安装mysql sudo apt-get -y install mysql-server sudo apt-get -y install ...

  8. [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist 160913 02:11:21 mysqld_safe mysqld from pid file /tmp/mysql.pid ended

    -- :: [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0 -- :: [Warning] InnoDB: New ...

  9. Starting MySQL ERROR! Couldn't find MySQL server (/usr/local/mysql/bin/mysqld_safe)

    centos7.5 安装mysql数据库报错 问题: [root@db04-54 scripts]# /etc/init.d/mysqld start /etc/init.d/mysqld: line ...

随机推荐

  1. winmd文件和dll文件的区别

    今天在研究一个二维码项目,用到一个第三方组件 ZXing,因为做的是Windows应用商店程序,应用商店程序是可以引用winmd文件也可以引用dll文件,但是这两种文件ZXing都提供了,最后和同事讨 ...

  2. NYoj-Binary String Matching-KMP算法

    Binary String Matching 时间限制:3000 ms  |  内存限制:65535 KB 难度:3 描写叙述 Given two strings A and B, whose alp ...

  3. 这个夏天不AC(杭州电2037)

    这个夏天不AC Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Su ...

  4. FastJson基本使用

    在发展中Android的过程中.假设我们常与server联系,更新数据等,然后,json它必须是一个良好的数据格公式,但随着json.使用原生的解析也能够,可是非常不高效,所以这里介绍两种json数据 ...

  5. NSIS API 函数常用备份

    原文:NSIS API 函数常用备份 关闭程序: System::Call `user32::AnimateWindow(i$HWNDPARENT,i200,i${AW_BLEND}|${AW_HID ...

  6. 一个IT学生的personal statement

    前一段时间的英语老师要求我们写一个自己的personal statement,我相信,作为一个IT学生,人很多personal statement应该都了如指掌.进一步的研究是必要的出国留学,当然,也 ...

  7. 新安装Win10

    随着微软发布Windows 10下载技术预览版.现在,您可以免费下载Windows 10技术预览ISO档,安装和开放经验. Windows 10技术预览提供的第一部英语.中国简体.葡萄牙语,含32位. ...

  8. 控件注册 - 利用资源文件将dll、ocx打包进exe文件(C#版)

    原文:控件注册 - 利用资源文件将dll.ocx打包进exe文件(C#版) 很多时候自定义或者引用控件都需要注册才能使用,但是如何使要注册的dll或ocx打包到exe中,使用户下载以后看到的只是一个e ...

  9. SpringMVC注释启用

    这篇文章是我学习的网络视频SpringMVC写的过程. 谢谢公布各位前辈的视频 以下评论SpringMVC几个关键步骤,注意事项启用: 首先需要加载配置文件(假设请使用自定义路径) <? xml ...

  10. 怎样用OleDbDataAdapter来对数据库进行操作?

      请问怎样用OleDbDataAdapter来对数据库进行删除.改动和加入? OleDbDataAdapter是DataSet和数据源之间建立联系的重要纽带.用它我们能够对数据库进行删除.改动和加入 ...