MySQL for Ubuntu服务无法启动

在Ubuntu系统下安装MySQL成功后,修改默认的配置文件my.cnf,比如添加默认字符集设置等,就无法启动MySQL服务,启动时的错误信息:Starting MySQL.... * The server quit without updating PID file (/usr/local/mysql/data/linx-pc.pid).请大神看下是什么原因造成的?

2个回答

hgl125
hgl125 你这个方法不行,是my.cnf配置有问题,比如 character-set-server=utf8就可以了。
大约 5 年之前 回复

额,你自己都知道问题了,按照别人规定的来做,不要想当然

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Ubuntu16.04 修改mysql 数据存储目录datadir 启动失败

Ubuntu16.04 修改mysql 数据存储目录datadir 启动失败 ,网上的各种方法都已经尝试,但是还是没有启动成功请教各位大神!!!!! 修改步骤 ## 创建 迁移文件夹 > cd /mnt > mkdir lib > cd lib && mkdir mysqldata > 数据存放在 /mnt/lib/mysqldata 修改所属用户 和所属用户组为 msyql > sudo chown -vR mysql:mysql /mnt/lib/mysqldata 修改权限 > sudo chmod -vR 700 /mnt/lib/mysqldata ### 迁移文件 停止服务 > sudo /etc/init.d/mysql stop 迁移数据 > cp -av /var/lib/mysql/* /mnt/lib/mysqldata # vim /etc/mysql/mysql.conf.d/mysqld.cnf 将 [mysqld] 组下的 datadir改为: datadir = /mnt/lib/mysqldata sudo vim /etc/apparmor.d/usr.sbin.mysqld 找到其中的 /var/lib/mysql/ r, /var/lib/mysql/** rwk, 两行权限声明,可以在前面加上#好注释掉。然后对照格式,加入新路径的权限声明: /mnt/lib/mysqldata/ r, /mnt/lib/mysqldata/** rwk 重启服务 配置文件修改成功后就可以重启数据库,重启数据库之前需要先重新载入apparmor配置文件,使用下面命令重新载入: > sudo /etc/init.d/apparmor restart >sudo /etc/init.d/mysql start 重启的时候 Starting mysql (via systemctl): mysql.serviceJob for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details. failed! root@iZm5e472vz1trxejt8m5akZ:/etc/mysql# systemctl status mysql.service ● mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) Active: active (running) since Sat 2018-06-23 00:55:37 CST; 25s ago Process: 13418 ExecStartPost=/usr/share/mysql/mysql-systemd-start post (code=exited, status=0/SUCCESS) Process: 13408 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS) Main PID: 13417 (mysqld) CGroup: /system.slice/mysql.service └─13417 /usr/sbin/mysqld . 配置文件 内容 ``` # # 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. # Here is entries for some specific programs # The following values assume you have at least 32M ram [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 datadir = /mnt/lib/mysqldata 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 = 0.0.0.0 # # * Fine Tuning # key_buffer_size = 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-options = 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 # # 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 ```

ubuntu14.04.1启动mysql出错

ubuntu版本为14.04.1,apt-get install mysql 启动出错: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) 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 # # 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/ 在/var/run/mysqld/中没有任何文件,/var/lib/mysql/下为 debian-5.5.flag ibdata1 ib_logfile0 ib_logfile1 mysql performance_schema 找不到mysqld.sock文件。

Ubuntu mysql的binlog只能放在/var/log/mysql下

mysql5.7 ubuntu16.4 binlog只能放在mysql配置文件默认的/var/log/mysql下,将路径修改为其他位置则提示权限不足 属主属组权限都给了myql,目录改为了777,依旧不行 /var/log/mysql目录权限 ```. root@ubuntu:/var/log/mysql# ll /var/log/mysql/ total 208 drwxr-x--- 2 mysql adm 4096 Jul 25 11:51 ./ drwxrwxr-x 7 root syslog 4096 Jul 25 10:08 ../ -rw-r----- 1 mysql adm 177095 Jul 25 11:51 error.log -rw-r----- 1 mysql mysql 177 Jul 25 11:39 mysql-bin.000001 -rw-r----- 1 mysql mysql 177 Jul 25 11:44 mysql-bin.000002 -rw-r----- 1 mysql mysql 177 Jul 25 11:49 mysql-bin.000003 -rw-r----- 1 mysql mysql 154 Jul 25 11:51 mysql-bin.000004 -rw-r----- 1 mysql mysql 128 Jul 25 11:51 mysql-bin.index ``` 属主属组完全相同但是还是报错 ```. 2019-07-25T03:50:31.499690Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000) 2019-07-25T03:50:31.499875Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000) 2019-07-25T03:50:31.678797Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2019-07-25T03:50:31.681269Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.27-0ubuntu0.16.04.1-log) starting as process 22722 ... mysqld: File '/log/mysql-bin.index' not found (Errcode: 13 - Permission denied) 2019-07-25T03:50:31.685861Z 0 [ERROR] Aborting 2019-07-25T03:50:31.685940Z 0 [Note] Binlog end 2019-07-25T03:50:31.686079Z 0 [Note] /usr/sbin/mysqld: Shutdown complete 2019-07-25T03:50:46.822469Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000) 2019-07-25T03:50:46.822565Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000) 2019-07-25T03:50:47.029772Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2019-07-25T03:50:47.032072Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.27-0ubuntu0.16.04.1-log) starting as process 22773 ... mysqld: File '/log/mysql-bin.index' not found (Errcode: 13 - Permission denied) 2019-07-25T03:50:47.037520Z 0 [ERROR] Aborting 2019-07-25T03:50:47.037610Z 0 [Note] Binlog end 2019-07-25T03:50:47.037763Z 0 [Note] /usr/sbin/mysqld: Shutdown complete 2019-07-25T03:51:17.533526Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000) 2019-07-25T03:51:17.533655Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000) 2019-07-25T03:51:17.791165Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2019-07-25T03:51:17.793337Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.27-0ubuntu0.16.04.1-log) starting as process 22853 ... mysqld: File '/log/mysql-bin.index' not found (Errcode: 13 - Permission denied) 2019-07-25T03:51:17.798406Z 0 [ERROR] Aborting 2019-07-25T03:51:17.798466Z 0 [Note] Binlog end 2019-07-25T03:51:17.799262Z 0 [Note] /usr/sbin/mysqld: Shutdown complete ```

在win10子系统ubuntu18.04下安装mysql5.7尝试重新启动的时候出现以下报错

在win10子系统ubuntu18.04下安装mysql5.7尝试重新启动的时候出现以下报错 1.安装mysql-server ``` root@PC-5200:/home/tom# apt-get -y install mysql-server ``` ``` Reading package lists... Done Building dependency tree Reading state information... Done The following package was automatically installed and is no longer required: libfreetype6 Use 'apt autoremove' to remove it. The following additional packages will be installed: libaio1 libcgi-fast-perl libcgi-pm-perl libencode-locale-perl libevent-core-2.1-6 libfcgi-perl libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl libio-html-perl liblwp-mediatypes-perl libssl1.1 libtimedate-perl liburi-perl mysql-client-5.7 mysql-client-core-5.7 mysql-common mysql-server-5.7 mysql-server-core-5.7 Suggested packages: libdata-dump-perl libipc-sharedcache-perl libwww-perl mailx tinyca The following NEW packages will be installed: libaio1 libcgi-fast-perl libcgi-pm-perl libencode-locale-perl libevent-core-2.1-6 libfcgi-perl libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl libio-html-perl liblwp-mediatypes-perl libtimedate-perl liburi-perl mysql-client-5.7 mysql-client-core-5.7 mysql-common mysql-server mysql-server-5.7 mysql-server-core-5.7 The following packages will be upgraded: libssl1.1 1 upgraded, 21 newly installed, 0 to remove and 136 not upgraded. Need to get 21.0 MB of archives. After this operation, 157 MB of additional disk space will be used. Get:1 http://mirrors.aliyun.com/ubuntu bionic/main amd64 mysql-common all 5.8+1.0.4 [7308 B] Get:2 http://mirrors.aliyun.com/ubuntu bionic-updates/main amd64 libaio1 amd64 0.3.110-5ubuntu0.1 [6476 B] Get:3 http://mirrors.aliyun.com/ubuntu bionic-security/main amd64 libssl1.1 amd64 1.1.1-1ubuntu2.1~18.04.5 [1300 kB] Get:4 http://mirrors.aliyun.com/ubuntu bionic-security/main amd64 mysql-client-core-5.7 amd64 5.7.28-0ubuntu0.18.04.4 [6644 kB] Get:5 http://mirrors.aliyun.com/ubuntu bionic-security/main amd64 mysql-client-5.7 amd64 5.7.28-0ubuntu0.18.04.4 [1943 kB] Get:6 http://mirrors.aliyun.com/ubuntu bionic-security/main amd64 mysql-server-core-5.7 amd64 5.7.28-0ubuntu0.18.04.4 [7432 kB] Get:7 http://mirrors.aliyun.com/ubuntu bionic/main amd64 libevent-core-2.1-6 amd64 2.1.8-stable-4build1 [85.9 kB] Get:8 http://mirrors.aliyun.com/ubuntu bionic-security/main amd64 mysql-server-5.7 amd64 5.7.28-0ubuntu0.18.04.4 [2932 kB] Get:9 http://mirrors.aliyun.com/ubuntu bionic/main amd64 libhtml-tagset-perl all 3.20-3 [12.1 kB] Get:10 http://mirrors.aliyun.com/ubuntu bionic/main amd64 liburi-perl all 1.73-1 [77.2 kB] Get:11 http://mirrors.aliyun.com/ubuntu bionic/main amd64 libhtml-parser-perl amd64 3.72-3build1 [85.9 kB] Get:12 http://mirrors.aliyun.com/ubuntu bionic/main amd64 libcgi-pm-perl all 4.38-1 [185 kB] Get:13 http://mirrors.aliyun.com/ubuntu bionic/main amd64 libfcgi-perl amd64 0.78-2build1 [32.8 kB] Get:14 http://mirrors.aliyun.com/ubuntu bionic/main amd64 libcgi-fast-perl all 1:2.13-1 [9940 B] Get:15 http://mirrors.aliyun.com/ubuntu bionic/main amd64 libencode-locale-perl all 1.05-1 [12.3 kB] Get:16 http://mirrors.aliyun.com/ubuntu bionic/main amd64 libhtml-template-perl all 2.97-1 [59.0 kB] Get:17 http://mirrors.aliyun.com/ubuntu bionic/main amd64 libtimedate-perl all 2.3000-2 [37.5 kB] Get:18 http://mirrors.aliyun.com/ubuntu bionic/main amd64 libhttp-date-perl all 6.02-1 [10.4 kB] Get:19 http://mirrors.aliyun.com/ubuntu bionic/main amd64 libio-html-perl all 1.001-1 [14.9 kB] Get:20 http://mirrors.aliyun.com/ubuntu bionic/main amd64 liblwp-mediatypes-perl all 6.02-1 [21.7 kB] Get:21 http://mirrors.aliyun.com/ubuntu bionic/main amd64 libhttp-message-perl all 6.14-1 [72.1 kB] Get:22 http://mirrors.aliyun.com/ubuntu bionic-security/main amd64 mysql-server all 5.7.28-0ubuntu0.18.04.4 [9940 B] Fetched 21.0 MB in 9s (2376 kB/s) Preconfiguring packages ... Selecting previously unselected package mysql-common. (Reading database ... 28663 files and directories currently installed.) Preparing to unpack .../0-mysql-common_5.8+1.0.4_all.deb ... Unpacking mysql-common (5.8+1.0.4) ... Selecting previously unselected package libaio1:amd64. Preparing to unpack .../1-libaio1_0.3.110-5ubuntu0.1_amd64.deb ... Unpacking libaio1:amd64 (0.3.110-5ubuntu0.1) ... Preparing to unpack .../2-libssl1.1_1.1.1-1ubuntu2.1~18.04.5_amd64.deb ... Unpacking libssl1.1:amd64 (1.1.1-1ubuntu2.1~18.04.5) over (1.1.0g-2ubuntu4.3) ... Selecting previously unselected package mysql-client-core-5.7. Preparing to unpack .../3-mysql-client-core-5.7_5.7.28-0ubuntu0.18.04.4_amd64.deb ... Unpacking mysql-client-core-5.7 (5.7.28-0ubuntu0.18.04.4) ... Selecting previously unselected package mysql-client-5.7. Preparing to unpack .../4-mysql-client-5.7_5.7.28-0ubuntu0.18.04.4_amd64.deb ... Unpacking mysql-client-5.7 (5.7.28-0ubuntu0.18.04.4) ... Selecting previously unselected package mysql-server-core-5.7. Preparing to unpack .../5-mysql-server-core-5.7_5.7.28-0ubuntu0.18.04.4_amd64.deb ... Unpacking mysql-server-core-5.7 (5.7.28-0ubuntu0.18.04.4) ... Selecting previously unselected package libevent-core-2.1-6:amd64. Preparing to unpack .../6-libevent-core-2.1-6_2.1.8-stable-4build1_amd64.deb ... Unpacking libevent-core-2.1-6:amd64 (2.1.8-stable-4build1) ... Setting up mysql-common (5.8+1.0.4) ... update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode Selecting previously unselected package mysql-server-5.7. (Reading database ... 28832 files and directories currently installed.) Preparing to unpack .../00-mysql-server-5.7_5.7.28-0ubuntu0.18.04.4_amd64.deb ... Unpacking mysql-server-5.7 (5.7.28-0ubuntu0.18.04.4) ... Selecting previously unselected package libhtml-tagset-perl. Preparing to unpack .../01-libhtml-tagset-perl_3.20-3_all.deb ... Unpacking libhtml-tagset-perl (3.20-3) ... Selecting previously unselected package liburi-perl. Preparing to unpack .../02-liburi-perl_1.73-1_all.deb ... Unpacking liburi-perl (1.73-1) ... Selecting previously unselected package libhtml-parser-perl. Preparing to unpack .../03-libhtml-parser-perl_3.72-3build1_amd64.deb ... Unpacking libhtml-parser-perl (3.72-3build1) ... Selecting previously unselected package libcgi-pm-perl. Preparing to unpack .../04-libcgi-pm-perl_4.38-1_all.deb ... Unpacking libcgi-pm-perl (4.38-1) ... Selecting previously unselected package libfcgi-perl. Preparing to unpack .../05-libfcgi-perl_0.78-2build1_amd64.deb ... Unpacking libfcgi-perl (0.78-2build1) ... Selecting previously unselected package libcgi-fast-perl. Preparing to unpack .../06-libcgi-fast-perl_1%3a2.13-1_all.deb ... Unpacking libcgi-fast-perl (1:2.13-1) ... Selecting previously unselected package libencode-locale-perl. Preparing to unpack .../07-libencode-locale-perl_1.05-1_all.deb ... Unpacking libencode-locale-perl (1.05-1) ... Selecting previously unselected package libhtml-template-perl. Preparing to unpack .../08-libhtml-template-perl_2.97-1_all.deb ... Unpacking libhtml-template-perl (2.97-1) ... Selecting previously unselected package libtimedate-perl. Preparing to unpack .../09-libtimedate-perl_2.3000-2_all.deb ... Unpacking libtimedate-perl (2.3000-2) ... Selecting previously unselected package libhttp-date-perl. Preparing to unpack .../10-libhttp-date-perl_6.02-1_all.deb ... Unpacking libhttp-date-perl (6.02-1) ... Selecting previously unselected package libio-html-perl. Preparing to unpack .../11-libio-html-perl_1.001-1_all.deb ... Unpacking libio-html-perl (1.001-1) ... Selecting previously unselected package liblwp-mediatypes-perl. Preparing to unpack .../12-liblwp-mediatypes-perl_6.02-1_all.deb ... Unpacking liblwp-mediatypes-perl (6.02-1) ... Selecting previously unselected package libhttp-message-perl. Preparing to unpack .../13-libhttp-message-perl_6.14-1_all.deb ... Unpacking libhttp-message-perl (6.14-1) ... Selecting previously unselected package mysql-server. Preparing to unpack .../14-mysql-server_5.7.28-0ubuntu0.18.04.4_all.deb ... Unpacking mysql-server (5.7.28-0ubuntu0.18.04.4) ... Setting up libhtml-tagset-perl (3.20-3) ... Setting up libevent-core-2.1-6:amd64 (2.1.8-stable-4build1) ... Processing triggers for ureadahead (0.100.0-21) ... Setting up libencode-locale-perl (1.05-1) ... Setting up libtimedate-perl (2.3000-2) ... Setting up libio-html-perl (1.001-1) ... Setting up liblwp-mediatypes-perl (6.02-1) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... Setting up libaio1:amd64 (0.3.110-5ubuntu0.1) ... Setting up liburi-perl (1.73-1) ... Setting up libssl1.1:amd64 (1.1.1-1ubuntu2.1~18.04.5) ... Checking for services that may need to be restarted...done. Checking for services that may need to be restarted...done. Checking init scripts... Restarting services possibly affected by the upgrade: invoke-rc.d: could not determine current runlevel Services restarted successfully. Processing triggers for systemd (237-3ubuntu10.21) ... Setting up libhtml-parser-perl (3.72-3build1) ... Setting up libcgi-pm-perl (4.38-1) ... Processing triggers for man-db (2.8.3-2ubuntu0.1) ... Setting up mysql-client-core-5.7 (5.7.28-0ubuntu0.18.04.4) ... Setting up libfcgi-perl (0.78-2build1) ... Setting up libhttp-date-perl (6.02-1) ... Setting up libhtml-template-perl (2.97-1) ... Setting up mysql-server-core-5.7 (5.7.28-0ubuntu0.18.04.4) ... Setting up libcgi-fast-perl (1:2.13-1) ... Setting up libhttp-message-perl (6.14-1) ... Setting up mysql-client-5.7 (5.7.28-0ubuntu0.18.04.4) ... Setting up mysql-server-5.7 (5.7.28-0ubuntu0.18.04.4) ... invoke-rc.d: could not determine current runlevel * Stopping MySQL database server mysqld [ OK ] update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode Renaming removed key_buffer and myisam-recover options (if present) Cannot open /proc/net/unix: No such file or directory Cannot stat file /proc/1/fd/5: Operation not permitted Cannot stat file /proc/1/fd/10: Operation not permitted Cannot stat file /proc/1/fd/6: Operation not permitted Cannot stat file /proc/7/fd/7: Operation not permitted Cannot stat file /proc/7/fd/10: Operation not permitted Cannot stat file /proc/7/fd/5: Operation not permitted Created symlink /etc/systemd/system/multi-user.target.wants/mysql.service → /lib/systemd/system/mysql.service. invoke-rc.d: could not determine current runlevel Setting up mysql-server (5.7.28-0ubuntu0.18.04.4) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... Processing triggers for ureadahead (0.100.0-21) ... Processing triggers for systemd (237-3ubuntu10.21) ... ``` 2.启动mysql服务 ``` root@PC-5200:/home/tom# systemctl start mysql.service ``` 3.出现如下报错 ``` System has not been booted with systemd as init system (PID 1). Can't operate. ```

#1045无法登录MySQL服务器

<div class="post-text" itemprop="text"> <p>I installed Apache, MySQL, PHP, and phpmyadmin, and I did everything needed to make the localhost/phpmyadmin webpage work correctly, with the two user inputs, I remember making my password and username 'root', when I try to log in, I get the error in the title. I've have been searching for an hour for a solution, but nothing has worked for me, please someone help, this is so frustrating! Thanks in advance</p> <p>PS. I also installed 'xampp' to start and stop mysql server (that's all I know how to use it for)</p> </div>

mysql service mysql restart 启动失败

kali linux 64位,通过一键安装包安装了LAMP mysql安装的位置在/web/server/mysql ,系统启动后,所有服务运行正常 但是通过service mysql restart 启动失败 提示:/etc/init.d/mysql:WARING:/etc/mysql/my.cnf cannot be read See README.warnn.gz... 而/etc/ 下根本没有mysql文件夹,只有一个mysql.bak 每次停止mysql后,没办法启动,只能重启电脑 这种情况该怎么办呢?

linux安装mysql时给/var/lib/mysql赋予权限

Linux中安装完mysql之后, 1.用service mysql start启动时,报错没有mysql.service这个文件或者目录 2.此时ls -l 了一下/var/lib之后显示 drwxr-x--x 5 mysql mysql 4096 May 16 19:05 mysql 3.执行命令chown mysql:mysql /var/lib/mysql –R之后mysql正常启动了 4.此时ls -l 了一下/var/lib之后显示 drwxr-x--x 5 mysql mysql 4096 May 16 19:05 mysql 问题:我就纳闷了,这执行命令chown mysql:mysql /var/lib/mysql –R前后 /var/lib/mysql的权限、所属用户、所属组都没变啊,为什么mysql就可以启动了?

mariadb安装后,非root无法mysql登录

**系统** ``` Ubuntu 16 ``` **安装方式** ``` sudo apt-get install mariadb-server python-pymysql ``` ** 两个疑问 ** 1. 非系统root不能通过mysql登录 2. MariaDB 接受空用户登录, 如何取消? user表没有 求科普, 感激不尽! ** 说明 ** * mysql已确认开启 ``` nginx@nginx-virtual-machine:~$ service mysql status ● mysql.service - LSB: Start and stop the mysql database server daemon Loaded: loaded (/etc/init.d/mysql; bad; vendor preset: enabled) Active: active (running) since Wed 2017-09-27 19:17:51 ULAST; 16h ago Docs: man:systemd-sysv-generator(8) Process: 29567 ExecStop=/etc/init.d/mysql stop (code=exited, status=0/SUCCESS) Process: 29603 ExecStart=/etc/init.d/mysql start (code=exited, status=0/SUCCESS) CGroup: /system.slice/mysql.service ├─29633 /bin/bash /usr/bin/mysqld_safe ├─29777 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/m └─29778 logger -t mysqld -p daemon error ``` * root登录 ``` nginx@nginx-virtual-machine:~$ sudo mysql -uroot -psqlpass Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 46 Server version: 10.0.31-MariaDB-0ubuntu0.16.04.2 Ubuntu 16.04 Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | my_test | | mysql | | performance_schema | +--------------------+ 4 rows in set (0.00 sec) MariaDB [(none)]> ``` * 非root登录 ``` nginx@nginx-virtual-machine:~$ mysql -uroot -psqlpass ERROR 1698 (28000): Access denied for user 'root'@'localhost' ``` * root用户, 空用户登录 ``` root@nginx-virtual-machine:/home/nginx# mysql Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 48 Server version: 10.0.31-MariaDB-0ubuntu0.16.04.2 Ubuntu 16.04 Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> ``` 但是查询不到默认用户 ``` MariaDB [mysql]> select * from user where 0 = length(User); Empty set (0.00 sec) MariaDB [mysql]> select count(1) from user; +----------+ | count(1) | +----------+ | 1 | +----------+ 1 row in set (0.00 sec) ``` 通过安全加固删除匿名账户后, 任然可以匿名登录. ``` nginx@nginx-virtual-machine:~$ sudo mysql_secure_installation NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MariaDB to secure it, we'll need the current password for the root user. If you've just installed MariaDB, and you haven't set the root password yet, the password will be blank, so you should just press enter here. Enter current password for root (enter for none): OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MariaDB root user without the proper authorisation. You already have a root password set, so you can safely answer 'n'. Change the root password? [Y/n] n ... skipping. By default, a MariaDB installation has an anonymous user, allowing anyone to log into MariaDB without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? [Y/n] y ... Success! Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] y ... Success! By default, MariaDB comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? [Y/n] y - Dropping test database... ... Success! - Removing privileges on test database... ... Success! Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? [Y/n] y ... Success! Cleaning up... All done! If you've completed all of the above steps, your MariaDB installation should now be secure. Thanks for using MariaDB! ```

CentOS7新安装mysql80 远程连接10060

虚拟机上面3306 端口开了 -A INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT root 用户也允许任何机器登陆,也给了权限了 update user set host='%' where user='root'; GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'WITH GRANT OPTION; 本机电脑防火墙也关掉了, 但是通过naicat连接的时候有时候有(2003-Can't connect to Mysql on '主机名'(10060 Unknown error))这个错误,有时候有(2003-Can't connect to Mysql on '主机名'(10061 Unknown error))这个错误 在虚拟机中终端连接使用mysql 没有问题,但是远程就会出现问题 请大神赐教!!!

mysql启动出现如下错误

[root@localhost mysql]# systemctl start mysql.service Failed to start mysql.service: Unit mysql.service failed to load: No such file or directory.

无法在PHP中启用mb_string

<div class="post-text" itemprop="text"> <p>I need to use <code>mb_strlen</code> to sort an array of words with diacritics, but PHP does not recognize this function, although <code>mb_string</code> is installed.</p> <p>So, if I say</p> <pre><code>function sortByStrlen($a, $b) { if (mb_strlen($a, "utf-8") === mb_strlen($b, "utf-8")) { return $a &gt; $b; } else { return mb_strlen($b, "utf-8") - mb_strlen($a, "utf-8"); } } #sort my array usort($myArray, 'sortByStrlen'); </code></pre> <p>Won't work on my Ubuntu virtual machine that is running on the server, although it was working on my Windows local machine,</p> <p>I've spent over 2,5 hours searching this issue and I've tried many solutions, both here in StackOverflow and in AskUbuntu.</p> <p>These solutions did not work for me:</p> <p><a href="https://stackoverflow.com/questions/4203730/php-call-to-undefined-function-mb-strlen-on-custom-compiled-php-with-mbstri">PHP: Call to undefined function mb_strlen() - on custom compiled PHP with mbstring enabled</a></p> <p><a href="https://stackoverflow.com/questions/6419102/fatal-error-call-to-undefined-function-mb-strlen">Fatal error: Call to undefined function mb_strlen()</a></p> <p><a href="https://stackoverflow.com/questions/48940696/call-to-undefined-function-yii-helpers-mb-strlen-on-php-in-yii2-framework">Call to undefined function yii\helpers\mb_strlen() on PHP in Yii2 Framework</a></p> <p><a href="https://askubuntu.com/questions/772397/mbstring-is-missing-for-phpmyadmin-in-ubuntu-16-04">https://askubuntu.com/questions/772397/mbstring-is-missing-for-phpmyadmin-in-ubuntu-16-04</a></p> <p>This is just to name a few! I did a deep search, but I did not find what I need. Please, do not mark it as duplicate because I really need help (indeed, this problem is making me tired).</p> <p>I already installed mb_string through the terminal:</p> <pre><code>sudo apt-get install php7.3-mbstring </code></pre> <p>I'm sure the <code>mbstring</code> module is compatible with my PHP version. Then, I uncommented the lines in php.ini to activate the <code>mbstring</code> module</p> <pre><code>;extension=mbstring </code></pre> <p>I also uncommented extensions:</p> <pre><code>extension_dir = "./" </code></pre> <p>I restarted the server:</p> <pre><code> sudo /etc/init.d/apache2 restart </code></pre> <p>I also see other modules, like <code>mysql</code>, when I use <code>php-m</code>.</p> <p>When I run <code>phpinfo</code>, I can see that the <code>mbstring</code> is on the list of the modules being loaded.</p> <p>If I run <code>php -m</code> on the terminal, it will give me a list of modules and <code>mbstring</code> is there.</p> <p>HOWEVER, if I run:</p> <pre><code>&lt;?php var_dump(extension_loaded('mbstring')); </code></pre> <p>It will ouput:</p> <pre><code>bool(false) </code></pre> <p>Yet, after all of this, I restarted Apache and MySQL many times. So I can't see why <code>mbstring</code> is not being enabled!</p> <p>As explained at the beginning of this post, I need to sort words with diacritics by their length. So, if you have another solution for this, I will accept it.</p> <p>I'm not getting error messages because this is for production. The code is running on my personal website in a virtual machine; because it is production, PHP does not show errors by default and I don't know how to enable them.</p> <p><strong>Notes:</strong> Ubuntu version is 18.04 PHP version is 7.3</p> <p><strong>UPDATE 2</strong></p> <p>As requested by @gview, if I run <code>dpkg -l | grep php</code>, I get:</p> <pre><code>ii libapache2-mod-php7.3 7.3.7-2+ubuntu18.04.1+deb.sury.org+1 amd64 server-side, HTML-embedded scripting language (Apache 2 module) ii php-common 2:69+ubuntu18.04.1+deb.sury.org+2+php7.3 all Common files for PHP packages ii php-gettext 1.0.12-0.1 all transitional dummy package for php-php-gettext ii php-mbstring 2:7.3+69+ubuntu18.04.1+deb.sury.org+2+php7.3 all MBSTRING module for PHP [default] ii php-pear 1:1.10.8+submodules+notgz-1+ubuntu18.04.1+deb.sury.org+1 all PEAR Base System ii php-php-gettext 1.0.12-0.1 all read gettext MO files directly, without requiring anything other than PHP ii php-xml 2:7.3+69+ubuntu18.04.1+deb.sury.org+2+php7.3 all DOM, SimpleXML, WDDX, XML, and XSL module for PHP [default] ii php7.3 7.3.7-2+ubuntu18.04.1+deb.sury.org+1 all server-side, HTML-embedded scripting language (metapackage) ii php7.3-cli 7.3.7-2+ubuntu18.04.1+deb.sury.org+1 amd64 command-line interpreter for the PHP scripting language ii php7.3-common 7.3.7-2+ubuntu18.04.1+deb.sury.org+1 amd64 documentation, examples and common module for PHP ii php7.3-json 7.3.7-2+ubuntu18.04.1+deb.sury.org+1 amd64 JSON module for PHP ii php7.3-mbstring 7.3.7-2+ubuntu18.04.1+deb.sury.org+1 amd64 MBSTRING module for PHP ii php7.3-mysql 7.3.7-2+ubuntu18.04.1+deb.sury.org+1 amd64 MySQL module for PHP ii php7.3-opcache 7.3.7-2+ubuntu18.04.1+deb.sury.org+1 amd64 Zend OpCache module for PHP ii php7.3-readline 7.3.7-2+ubuntu18.04.1+deb.sury.org+1 amd64 readline module for PHP ii php7.3-xml 7.3.7-2+ubuntu18.04.1+deb.sury.org+1 amd64 DOM, SimpleXML, WDDX, XML, and XSL module for PHP </code></pre> <p>That may help you help me.</p> </div>

hive 0.13.1元数据库无法变成mysql

我把hive-0.12升级成0.13.1版本,先在mysql里执行了source upgrade-0.12.0-to-0.13.0.mysql.sql成功了,然后在mysql中创建了一个hivenew(0.12版的是hive)用户,并给予了权限,更改了hive-site.xml文件如下: 1. <property> 2. <name>hive.stats.dbclass</name> 3. <value>jdbc:mysql</value> 4. <description>The default database that stores temporary hive statistics.</description> 5. </property> 6. 7. <property> 8. <name>hive.stats.jdbcdriver</name> 9. <value>com.mysql.jdbc.Driver</value> 10. <description>The JDBC driver for the database that stores temporary hive statistics.</description> 11. </property> 12. 13. <property> 14. <name>hive.stats.dbconnectionstring</name> 15. <value>jdbc:mysql://localhost:3306/hivenew</value> 16. <description>The default connection string for the database that stores temporary hive statistics.</description> 17. </property> <property> <name>javax.jdo.option.ConnectionURL</name> <value>jdbc:mysql://localhost:3306/hivenew?createDatabaseIfNotExist=true</value> <description>JDBC connect string for a JDBC metastore</description> </property> <property> <name>javax.jdo.option.ConnectionDriverName</name> <value>com.mysql.jdbc.Driver</value> <description>Driver class name for a JDBC metastore</description> </property> <property> <name>javax.jdo.option.ConnectionUserName</name> <value>hivenew</value> <description>username to use against metastore database</description> </property> <property> <name>javax.jdo.option.ConnectionPassword</name> <value>hivenew</value> <description>password to use against metastore database</description> </property> 保存后,把mysql的jdbc复制到了lib下,然后启动hive,虽然能正常显示hive>,和show tables; 但是在mysql里根本没有hivenew这个数据库,我装0.12时装好后自动就有了hive数据库,而show tables,也没有我在hivenew下创建的表格,而且经常出现Caused by: ERROR XSDB6: Another instance of Derby may have already booted the database /opt/apache-hive-0.13.1-bin/metastore_db.这样的错误 可见元数据库仍旧是derby,更诡异的是我把hive-site.xml删掉之后,hive它仍旧工作良好能正常显示hive>,和show tables,难道hive-site.xml的配置都无关紧要吗?求求大家帮帮我,急死人了

求助mariadb安装后启动不了的问题

虚拟机上的cent0s6.2,安装mariadb5.5.20,按照以下步骤安装: shell> groupadd mysql shell> useradd -g mysql mysql shell> cd /usr/local shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf - shell> ln -s full-path-to-mysql-VERSION-OS mysql shell> cd mysql shell> chown -R mysql . shell> chgrp -R mysql . shell> scripts/mysql_install_db --user=mysql shell> chown -R root . shell> chown -R mysql data shell> bin/mysqld_safe --user=mysql & 最后一步报错: [root@localhost mariadb-5.5.20-linux-x86_64]# bin/mysqld_safe --user=mysql & [1] 3074 [root@localhost mariadb-5.5.20-linux-x86_64]# 170406 05:10:57 mysqld_safe Logging to '/usr/local/mariadb-5.5.20-linux-x86_64/data/localhost.localdomain.err'. 170406 05:10:57 mysqld_safe Starting mysqld daemon with databases from /usr/local/mariadb-5.5.20-linux-x86_64/data 170406 05:11:00 mysqld_safe mysqld from pid file /usr/local/mariadb-5.5.20-linux-x86_64/data/localhost.localdomain.pid ended [1]+ Done bin/mysqld_safe --user=mysql 求助,这个百度了好长时间,没找到合适的解决方法。

mysql-proxy搭建完毕,启动报错:cannot execute binary file: Exec format error?

1. 问题描述:mysql-proxy数据库中间件搭建完毕之后, “#./mysql-proxy --defaults-file=/opt/bastion/mysql-proxy/mysql-proxy.cnf”启动,之后报错:![图片说明](https://img-ask.csdn.net/upload/202003/07/1583589960_956197.png) 正常需要开放执行权限的文件已经开放。

Openstack內的keystone用不上任何指令

Openstack安裝完成後裝上了keystone, 但指令像用不上, 例如show tables, 只出現-> OS : Ubuntu 14.04 root@controller:~# mysql -uroot -p123 Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 36 Server version: 5.5.63-MariaDB-1ubuntu0.14.04.1 (Ubuntu) Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> use keystone Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed MariaDB [keystone]> show tables -> ->

Apache没有在运行Virtualmin和http 2.0的Ubuntu 16.04中启动

<div class="post-text" itemprop="text"> <h1>THE PROBLEM</h1> <p>Apache2 in Ubuntu 16.04 will not start and I'm getting a very generic non-descriptive error and don't know what to do?</p> <h1>THE LOGS/ERRORS</h1> <h3>apache2 restart</h3> <p><code>systemctl restart apache2.service</code> gives the error...</p> <p><code>Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.</code></p> <h3>apache2 status</h3> <p><code>systemctl status apache2.service</code> gives the error...</p> <pre><code>● apache2.service - The Apache HTTP Server Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Thu 2019-01-03 02:35:00 UTC; 1min 55s ago Process: 28312 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE) Jan 03 02:35:00 web3 systemd[1]: Starting The Apache HTTP Server... Jan 03 02:35:00 web3 apachectl[28312]: Action 'start' failed. Jan 03 02:35:00 web3 apachectl[28312]: The Apache error log may have more information. Jan 03 02:35:00 web3 systemd[1]: apache2.service: Control process exited, code=exited status=1 Jan 03 02:35:00 web3 systemd[1]: Failed to start The Apache HTTP Server. Jan 03 02:35:00 web3 systemd[1]: apache2.service: Unit entered failed state. Jan 03 02:35:00 web3 systemd[1]: apache2.service: Failed with result 'exit-code'. </code></pre> <h3>journalctl -xe</h3> <p><code>journalctl -xe</code> gives the error...</p> <p>Pretty much identical to <code>systemctl restart apache2.service</code></p> <h3>/var/log/apache2/error.log</h3> <p><code>/var/log/apache2/error.log</code> gives the error...</p> <p><code>AH00016: Configuration Failed</code></p> <h3>apachectl -t</h3> <p>Make sure the Aapche2 syntax is okay...</p> <p><code>apachectl -t</code> or <code>apachectl configtest</code> returns...</p> <p><code>Syntax OK</code></p> <h1>THE APACHE2 CONF FILE (the rest are identical)</h1> <p>Now, here is the contents of one of the Apache2 conf files. The others are all similar. I'm running everything in <code>fcgid</code> mode. Also notice I have <code>Protocols h2 h2c http/1.1</code> in here.</p> <p><code>/etc/apache2/sites-available/example.com.conf</code></p> <pre><code>&lt;VirtualHost 123.123.123.123:80&gt; SuexecUserGroup "#1917" "#1917" ServerName example.com ServerAlias www.example.com ServerAlias webmail.example.com ServerAlias admin.example.com DocumentRoot /home/example/public_html ErrorLog /var/log/virtualmin/example.com_error_log CustomLog /var/log/virtualmin/example.com_access_log combined ScriptAlias /cgi-bin/ /home/example/cgi-bin/ DirectoryIndex index.html index.htm index.php index.php4 index.php5 Protocols h2 h2c http/1.1 RewriteEngine on RewriteCond %{HTTP_HOST} !^$ RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteCond %{HTTP_HOST} !^\w+\.\w+\.\w+ [NC] RewriteRule ^(.*)$ http://www.%{HTTP_HOST}$1 [R=301,L] RewriteCond %{HTTP_HOST} =webmail.example.com RewriteRule ^(.*) https://example.com:20000/ [R] RewriteCond %{HTTP_HOST} =admin.example.com RewriteRule ^(.*) https://example.com:10000/ [R] &lt;Directory /home/example/public_html&gt; Options -Indexes +SymLinksIfOwnerMatch +ExecCGI allow from all AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch Require all granted AddType application/x-httpd-php .php AddHandler fcgid-script .php AddHandler fcgid-script .php5.6 AddHandler fcgid-script .php7.0 AddHandler fcgid-script .php7.1 AddHandler fcgid-script .php7.2 AddHandler fcgid-script .php7.3 FCGIWrapper /home/example/fcgi-bin/php7.3.fcgi .php FCGIWrapper /home/example/fcgi-bin/php5.6.fcgi .php5.6 FCGIWrapper /home/example/fcgi-bin/php7.0.fcgi .php7.0 FCGIWrapper /home/example/fcgi-bin/php7.1.fcgi .php7.1 FCGIWrapper /home/example/fcgi-bin/php7.2.fcgi .php7.2 FCGIWrapper /home/example/fcgi-bin/php7.3.fcgi .php7.3 &lt;/Directory&gt; &lt;Directory /home/example/cgi-bin&gt; allow from all AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch &lt;/Directory&gt; &lt;IfModule php5_module&gt; php_value newrelic.appname "example.com" &lt;/IfModule&gt; RemoveHandler .php RemoveHandler .php5.6 RemoveHandler .php7.0 RemoveHandler .php7.1 RemoveHandler .php7.2 RemoveHandler .php7.3 IPCCommTimeout 25001 FcgidMaxRequestLen 1073741824 &lt;/VirtualHost&gt; &lt;VirtualHost 123.123.123.123:443&gt; SuexecUserGroup "#1917" "#1917" ServerName example.com ServerAlias www.example.com ServerAlias webmail.example.com ServerAlias admin.example.com DocumentRoot /home/example/public_html ErrorLog /var/log/virtualmin/example.com_error_log CustomLog /var/log/virtualmin/example.com_access_log combined ScriptAlias /cgi-bin/ /home/example/cgi-bin/ DirectoryIndex index.html index.htm index.php index.php4 index.php5 Protocols h2 h2c http/1.1 RewriteEngine on RewriteCond %{HTTP_HOST} !^$ RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteCond %{HTTP_HOST} !^\w+\.\w+\.\w+ [NC] RewriteRule ^(.*)$ http://www.%{HTTP_HOST}$1 [R=301,L] RewriteCond %{HTTP_HOST} =webmail.example.com RewriteRule ^(.*) https://example.com:20000/ [R] RewriteCond %{HTTP_HOST} =admin.example.com RewriteRule ^(.*) https://example.com:10000/ [R] &lt;Directory /home/example/public_html&gt; Options -Indexes +SymLinksIfOwnerMatch +ExecCGI allow from all AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch Require all granted AddType application/x-httpd-php .php AddHandler fcgid-script .php AddHandler fcgid-script .php5.6 AddHandler fcgid-script .php7.0 AddHandler fcgid-script .php7.1 AddHandler fcgid-script .php7.2 AddHandler fcgid-script .php7.3 FCGIWrapper /home/example/fcgi-bin/php7.3.fcgi .php FCGIWrapper /home/example/fcgi-bin/php5.6.fcgi .php5.6 FCGIWrapper /home/example/fcgi-bin/php7.0.fcgi .php7.0 FCGIWrapper /home/example/fcgi-bin/php7.1.fcgi .php7.1 FCGIWrapper /home/example/fcgi-bin/php7.2.fcgi .php7.2 FCGIWrapper /home/example/fcgi-bin/php7.3.fcgi .php7.3 &lt;/Directory&gt; &lt;Directory /home/example/cgi-bin&gt; allow from all AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch &lt;/Directory&gt; &lt;IfModule php5_module&gt; php_value newrelic.appname "example.com" &lt;/IfModule&gt; RemoveHandler .php RemoveHandler .php5.6 SSLEngine on SSLCertificateFile /home/example/ssl.cert SSLCertificateKeyFile /home/example/ssl.key SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1 RemoveHandler .php7.0 RemoveHandler .php7.1 RemoveHandler .php7.2 RemoveHandler .php7.3 IPCCommTimeout 25001 FcgidMaxRequestLen 1073741824 &lt;/VirtualHost&gt; </code></pre> <h1>THE OS AND OVERVIEW OF WHAT I'VE INSTALLED</h1> <ul> <li>Ubuntu 16.04 droplet from DigitalOcean</li> <li>Fresh install of Virtualmin <a href="https://www.digitalocean.com/community/tutorials/how-to-install-virtualmin-with-webmin-lamp-bind-and-postfix-on-ubuntu-16-04" rel="nofollow noreferrer">using these instructions</a></li> <li>Multiple <code>virtualhost</code> domains managed by Virtualmin all running in <code>fcgid</code> mode</li> <li>Installed PHP 5.6, 7.0, 7.1, 7.2, 7.3 using <a href="https://www.virtualmin.com/documentation/web/multiplephp" rel="nofollow noreferrer">these Ubuntu instructions</a></li> <li>Changed to http 2.0 <a href="https://techwombat.com/enable-http2-apache-ubuntu-16-04/" rel="nofollow noreferrer">using these instructions</a></li> </ul> <h1>APACHE2 AND PHP MODULES</h1> <h3>apache2ctl -M | sort</h3> <pre><code> access_compat_module (shared) actions_module (shared) alias_module (shared) auth_basic_module (shared) auth_digest_module (shared) authn_core_module (shared) authn_file_module (shared) authz_core_module (shared) authz_host_module (shared) authz_user_module (shared) autoindex_module (shared) cgi_module (shared) core_module (static) dav_fs_module (shared) dav_module (shared) deflate_module (shared) dir_module (shared) env_module (shared) fcgid_module (shared) filter_module (shared) http2_module (shared) http_module (static) lbmethod_byrequests_module (shared) log_config_module (static) logio_module (static) mime_module (shared) mpm_event_module (shared) negotiation_module (shared) proxy_balancer_module (shared) proxy_connect_module (shared) proxy_fcgi_module (shared) proxy_http_module (shared) proxy_module (shared) reqtimeout_module (shared) rewrite_module (shared) setenvif_module (shared) slotmem_shm_module (shared) socache_shmcb_module (shared) so_module (static) ssl_module (shared) status_module (shared) suexec_module (shared) unixd_module (static) version_module (static) watchdog_module (static) </code></pre> <h3>php -m</h3> <pre><code>[PHP Modules] bcmath calendar Core ctype date dom exif fileinfo filter ftp gd gettext hash iconv intl json libxml mbstring mcrypt mysqli mysqlnd openssl pcntl pcre PDO pdo_mysql Phar posix pspell readline recode Reflection session shmop SimpleXML soap sockets SPL standard sysvmsg sysvsem sysvshm tokenizer wddx xdebug xml xmlreader xmlrpc xmlwriter xsl zlib [Zend Modules] Xdebug </code></pre> <h3>apt list --installed | grep php</h3> <pre><code>libapache2-mod-php5.6/xenial,now 5.6.39-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic] libapache2-mod-php7.0/xenial,now 7.0.33-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] libapache2-mod-php7.1/xenial,now 7.1.25-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic] libapache2-mod-php7.2/xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic] libapache2-mod-php7.3/xenial,now 7.3.0-2+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic] php/xenial,now 2:7.2+69+ubuntu16.04.1+deb.sury.org+1 all [installed] php-cgi/xenial,now 2:7.2+69+ubuntu16.04.1+deb.sury.org+1 all [installed] php-cli/xenial,now 2:7.2+69+ubuntu16.04.1+deb.sury.org+1 all [installed,automatic] php-common/xenial,now 2:69+ubuntu16.04.1+deb.sury.org+1 all [installed,automatic] php-mbstring/xenial,now 2:7.2+69+ubuntu16.04.1+deb.sury.org+1 all [installed,automatic] php-mcrypt/xenial-updates,now 1:7.0+35ubuntu6.1 all [installed] php-mysql/xenial,now 2:7.2+69+ubuntu16.04.1+deb.sury.org+1 all [installed,automatic] php-pear/xenial,now 1:1.10.6+submodules+notgz-1+ubuntu16.04.1+deb.sury.org+2 all [installed,automatic] php-xdebug/xenial,now 2.7.0~beta1+2.6.1+2.5.5-1+ubuntu16.04.1+deb.sury.org+10 amd64 [installed] php-xml/xenial,now 2:7.2+69+ubuntu16.04.1+deb.sury.org+1 all [installed,automatic] php-zip/xenial,now 2:7.2+69+ubuntu16.04.1+deb.sury.org+1 all [installed] php5.6/xenial,now 5.6.39-1+ubuntu16.04.1+deb.sury.org+1 all [installed] php5.6-bcmath/xenial,now 5.6.39-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php5.6-cli/xenial,now 5.6.39-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php5.6-common/xenial,now 5.6.39-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php5.6-fpm/xenial,now 5.6.39-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php5.6-gd/xenial,now 5.6.39-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php5.6-intl/xenial,now 5.6.39-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php5.6-json/xenial,now 5.6.39-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php5.6-mbstring/xenial,now 5.6.39-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php5.6-mcrypt/xenial,now 5.6.39-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php5.6-mysql/xenial,now 5.6.39-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php5.6-opcache/xenial,now 5.6.39-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic] php5.6-pspell/xenial,now 5.6.39-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php5.6-readline/xenial,now 5.6.39-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic] php5.6-recode/xenial,now 5.6.39-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php5.6-soap/xenial,now 5.6.39-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php5.6-xml/xenial,now 5.6.39-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php5.6-xmlrpc/xenial,now 5.6.39-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.0/xenial,now 7.0.33-1+ubuntu16.04.1+deb.sury.org+1 all [installed] php7.0-bcmath/xenial,now 7.0.33-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.0-cgi/xenial,now 7.0.33-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic] php7.0-cli/xenial,now 7.0.33-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.0-common/xenial,now 7.0.33-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic] php7.0-fpm/xenial,now 7.0.33-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.0-gd/xenial,now 7.0.33-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.0-intl/xenial,now 7.0.33-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.0-json/xenial,now 7.0.33-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic] php7.0-mbstring/xenial,now 7.0.33-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic] php7.0-mcrypt/xenial,now 7.0.33-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.0-mysql/xenial,now 7.0.33-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.0-opcache/xenial,now 7.0.33-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic] php7.0-pspell/xenial,now 7.0.33-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.0-readline/xenial,now 7.0.33-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic] php7.0-recode/xenial,now 7.0.33-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.0-soap/xenial,now 7.0.33-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.0-xml/xenial,now 7.0.33-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic] php7.0-xmlrpc/xenial,now 7.0.33-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.1/xenial,now 7.1.25-1+ubuntu16.04.1+deb.sury.org+1 all [installed] php7.1-bcmath/xenial,now 7.1.25-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.1-cli/xenial,now 7.1.25-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.1-common/xenial,now 7.1.25-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.1-fpm/xenial,now 7.1.25-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.1-gd/xenial,now 7.1.25-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.1-intl/xenial,now 7.1.25-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.1-json/xenial,now 7.1.25-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.1-mbstring/xenial,now 7.1.25-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.1-mcrypt/xenial,now 7.1.25-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.1-mysql/xenial,now 7.1.25-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.1-opcache/xenial,now 7.1.25-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic] php7.1-pspell/xenial,now 7.1.25-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.1-readline/xenial,now 7.1.25-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic] php7.1-recode/xenial,now 7.1.25-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.1-soap/xenial,now 7.1.25-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.1-xml/xenial,now 7.1.25-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.1-xmlrpc/xenial,now 7.1.25-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.2/xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 all [installed] php7.2-bcmath/xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.2-cgi/xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic] php7.2-cli/xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.2-common/xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.2-fpm/xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.2-gd/xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.2-intl/xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.2-json/xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.2-mbstring/xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.2-mysql/xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.2-opcache/xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic] php7.2-pspell/xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.2-readline/xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic] php7.2-recode/xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.2-soap/xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.2-xml/xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.2-xmlrpc/xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.2-zip/xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic] php7.3/xenial,now 7.3.0-2+ubuntu16.04.1+deb.sury.org+1 all [installed] php7.3-bcmath/xenial,now 7.3.0-2+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.3-cli/xenial,now 7.3.0-2+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.3-common/xenial,now 7.3.0-2+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.3-fpm/xenial,now 7.3.0-2+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.3-gd/xenial,now 7.3.0-2+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.3-intl/xenial,now 7.3.0-2+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.3-json/xenial,now 7.3.0-2+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.3-mbstring/xenial,now 7.3.0-2+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.3-mysql/xenial,now 7.3.0-2+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.3-opcache/xenial,now 7.3.0-2+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic] php7.3-pspell/xenial,now 7.3.0-2+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.3-readline/xenial,now 7.3.0-2+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic] php7.3-recode/xenial,now 7.3.0-2+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.3-soap/xenial,now 7.3.0-2+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.3-xml/xenial,now 7.3.0-2+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] php7.3-xmlrpc/xenial,now 7.3.0-2+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] webmin-php-pear/virtualmin-universal,now 1.5 all [installed,automatic] </code></pre> </div>

求助MySQL: Cannot Connect to Database Service

用的是MySQL 5.7 有一年多了,在7.18日重新动数据库发现所有都连接不起。 服务启动的:![图片说明](https://img-ask.csdn.net/upload/201707/20/1500537840_290168.png) 各种找问题 用命令行可以登进去并查看数据库信息,but用软件连都不行 ![图片说明](https://img-ask.csdn.net/upload/201707/20/1500537977_627346.png) 在此处发现问题 ![图片说明](https://img-ask.csdn.net/upload/201707/20/1500537632_546065.png) ![图片说明](https://img-ask.csdn.net/upload/201707/20/1500537650_74656.png) ![图片说明](https://img-ask.csdn.net/upload/201707/20/1500537664_766429.png) ![图片说明](https://img-ask.csdn.net/upload/201707/20/1500537677_575205.png) 请问这个报错如何解决。 请各位大佬们提提建议! 谢谢!

启动多个PHP进程

<div class="post-text" itemprop="text"> <p>So I have a script which does the following:</p> <pre><code>for ($i = $start;$i&lt;=$end;$i++){ shell_exec("php /home/mysql_box/script.php phrases $i {$argv[3]} &gt; /dev/null 2&gt;&amp;1 &amp;"); } </code></pre> <p>On one of my servers I would like this script to run 400 times. As part of the call it connects to a Mysql server on a different box but for some wierd reason hits about 130 connections and then errors saying "Mysql server has gone away". </p> <p>I appreciate this is quite common and the MySQL manual states:</p> <blockquote> <p>You can also encounter this error with applications that fork child processes, all of which try to use the same connection to the MySQL server. This can be avoided by using a separate connection for each child process.</p> </blockquote> <p>However I wouldn't be using the same connection surely? My <code>wait_timeout</code> is the default - but huge so why would some connections simply not be able to connect?</p> <p>A couple of other points from the manual:</p> <ol> <li>The connection uses the IP not host name</li> <li>I didn't start mysql with skip-networking</li> <li>The query is a single one liner - its not big</li> <li>I am using Ubuntu</li> <li>I am connecting with PDO</li> </ol> <p>I hope I've given enough info to help.</p> </div>

求助:安装在Mac上的xampp无法通过localhost访问,只能通过本地ip访问

<div class="post-text" itemprop="text"> <p>在Mac上安装了xampp之后,如何使其通过本地主机或127.0.0.1访问<a href="http://192.168.64.2/dashboard" rel="noreferrer">http://192.168.64.2/dashboard</a>?</p> </div>

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

程序员请照顾好自己,周末病魔差点一套带走我。

程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。

和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...

搜狗输入法也在挑战国人的智商!

故事总是一个接着一个到来...上周写完《鲁大师已经彻底沦为一款垃圾流氓软件!》这篇文章之后,鲁大师的市场工作人员就找到了我,希望把这篇文章删除掉。经过一番沟通我先把这篇文章从公号中删除了...

总结了 150 余个神奇网站,你不来瞅瞅吗?

原博客再更新,可能就没了,之后将持续更新本篇博客。

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

MySQL数据库面试题(2020最新版)

文章目录数据库基础知识为什么要使用数据库什么是SQL?什么是MySQL?数据库三大范式是什么mysql有关权限的表都有哪几个MySQL的binlog有有几种录入格式?分别有什么区别?数据类型mysql有哪些数据类型引擎MySQL存储引擎MyISAM与InnoDB区别MyISAM索引与InnoDB索引的区别?InnoDB引擎的4大特性存储引擎选择索引什么是索引?索引有哪些优缺点?索引使用场景(重点)...

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

优雅的替换if-else语句

场景 日常开发,if-else语句写的不少吧??当逻辑分支非常多的时候,if-else套了一层又一层,虽然业务功能倒是实现了,但是看起来是真的很不优雅,尤其是对于我这种有强迫症的程序"猿",看到这么多if-else,脑袋瓜子就嗡嗡的,总想着解锁新姿势:干掉过多的if-else!!!本文将介绍三板斧手段: 优先判断条件,条件不满足的,逻辑及时中断返回; 采用策略模式+工厂模式; 结合注解,锦...

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

2020阿里全球数学大赛:3万名高手、4道题、2天2夜未交卷

阿里巴巴全球数学竞赛( Alibaba Global Mathematics Competition)由马云发起,由中国科学技术协会、阿里巴巴基金会、阿里巴巴达摩院共同举办。大赛不设报名门槛,全世界爱好数学的人都可参与,不论是否出身数学专业、是否投身数学研究。 2020年阿里巴巴达摩院邀请北京大学、剑桥大学、浙江大学等高校的顶尖数学教师组建了出题组。中科院院士、美国艺术与科学院院士、北京国际数学...

男生更看重女生的身材脸蛋,还是思想?

往往,我们看不进去大段大段的逻辑。深刻的哲理,往往短而精悍,一阵见血。问:产品经理挺漂亮的,有点心动,但不知道合不合得来。男生更看重女生的身材脸蛋,还是...

程序员为什么千万不要瞎努力?

本文作者用对比非常鲜明的两个开发团队的故事,讲解了敏捷开发之道 —— 如果你的团队缺乏统一标准的环境,那么即使勤劳努力,不仅会极其耗时而且成果甚微,使用...

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

当HR压你价,说你只值7K,你该怎么回答?

当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...

面试:第十六章:Java中级开发(16k)

HashMap底层实现原理,红黑树,B+树,B树的结构原理 Spring的AOP和IOC是什么?它们常见的使用场景有哪些?Spring事务,事务的属性,传播行为,数据库隔离级别 Spring和SpringMVC,MyBatis以及SpringBoot的注解分别有哪些?SpringMVC的工作原理,SpringBoot框架的优点,MyBatis框架的优点 SpringCould组件有哪些,他们...

面试阿里p7,被按在地上摩擦,鬼知道我经历了什么?

面试阿里p7被问到的问题(当时我只知道第一个):@Conditional是做什么的?@Conditional多个条件是什么逻辑关系?条件判断在什么时候执...

面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?

最近面试了一个31岁8年经验的程序猿,让我有点感慨,大龄程序猿该何去何从。

大三实习生,字节跳动面经分享,已拿Offer

说实话,自己的算法,我一个不会,太难了吧

程序员垃圾简历长什么样?

已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...

《Oracle Java SE编程自学与面试指南》最佳学习路线图2020年最新版(进大厂必备)

正确选择比瞎努力更重要!

《Oracle Java SE编程自学与面试指南》最佳学习路线图(2020最新版)

正确选择比瞎努力更重要!

都前后端分离了,咱就别做页面跳转了!统统 JSON 交互

文章目录1. 无状态登录1.1 什么是有状态1.2 什么是无状态1.3 如何实现无状态1.4 各自优缺点2. 登录交互2.1 前后端分离的数据交互2.2 登录成功2.3 登录失败3. 未认证处理方案4. 注销登录 这是本系列的第四篇,有小伙伴找不到之前文章,松哥给大家列一个索引出来: 挖一个大坑,Spring Security 开搞! 松哥手把手带你入门 Spring Security,别再问密...

字节跳动面试官竟然问了我JDBC?

轻松等回家通知

面试官:你连SSO都不懂,就别来面试了

大厂竟然要考我SSO,卧槽。

阿里面试官让我用Zk(Zookeeper)实现分布式锁

他可能没想到,我当场手写出来了

终于,月薪过5万了!

来看几个问题想不想月薪超过5万?想不想进入公司架构组?想不想成为项目组的负责人?想不想成为spring的高手,超越99%的对手?那么本文内容是你必须要掌握的。本文主要详解bean的生命...

自从喜欢上了B站这12个UP主,我越来越觉得自己是个废柴了!

不怕告诉你,我自从喜欢上了这12个UP主,哔哩哔哩成为了我手机上最耗电的软件,几乎每天都会看,可是吧,看的越多,我就越觉得自己是个废柴,唉,老天不公啊,不信你看看…… 间接性踌躇满志,持续性混吃等死,都是因为你们……但是,自己的学习力在慢慢变强,这是不容忽视的,推荐给你们! 都说B站是个宝,可是有人不会挖啊,没事,今天咱挖好的送你一箩筐,首先啊,我在B站上最喜欢看这个家伙的视频了,为啥 ,咱撇...

代码注释如此沙雕,会玩还是你们程序员!

某站后端代码被“开源”,同时刷遍全网的,还有代码里的那些神注释。 我们这才知道,原来程序员个个都是段子手;这么多年来,我们也走过了他们的无数套路… 首先,产品经理,是永远永远吐槽不完的!网友的评论也非常扎心,说看这些代码就像在阅读程序员的日记,每一页都写满了对产品经理的恨。 然后,也要发出直击灵魂的质问:你是尊贵的付费大会员吗? 这不禁让人想起之前某音乐app的穷逼Vip,果然,穷逼在哪里都是...

立即提问
相关内容推荐