mysql-5.7.22 重启后报错 10C

Starting MySQL.The server quit without updating PID file (/[FAILED]mysqld/mysqld.pid).
手动创建 mysqld.pid文件后 提示成功 但是并未启动成功
各种权限 也修改了 求大神指点

19个回答

你没给截图,我觉得可能是你没有配置环境吧

数据库经常这样,如果是Java,重新配置环境吧

产生这种错误的原因有很多种,具体的原因根据错误日志分析:
1. 可能是已经存在mysql进程
解决方法:杀死mysql进程,重新启动

  1. mysql在启动时没有指定配置文件时会使用/etc/my.cnf配置文件,请打开这个文件查看在[mysqld]节下有没有指定数据目录(datadir)。
    解决方法:请在[mysqld]下设置这一行:datadir = /usr/local/mysql/data

  2. skip-federated字段问题
    解决方法:注释掉/etc/my.cnf文件中的skip-federated字段

mysql 没有启动,自然不会创建pid文件,你给的报错日志太少了,信息量不够,没有办法看出来问题所在

试用一下低版本,实在不行卸载重装

从新平配置吧,不然就下载个新的

这种情况是 在非正常关机的情况下出现,即 linux 上的mysql 服务没有关闭 (当你退出远程登录linux 的xshell 客户端时);可以执行 service mysql stop 关闭服务或者直接kill掉;然后手动删除mysqld.pid 文件 ,重启mysql 服务。

你给的报错日志太少了,信息量不够,没有办法看出来问题所在

通常这种错误也可能是误删除mysql的server服务,所以启动错误。
如果不是,又找不到原因,那么卸载清理重新安装是最快的解决办法,与版本关系不大。

去看看,sql进程,,直接杀死,看看配置文件有没有动过,,,是在不行就重装

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

[root@localhost log]# service mysql start Starting MySQL...The server quit without updating PID file [失败]/mysql/localhost.pid).

CentOS6.9 (MySql v5.7.22) 使用mysql C API mysql_real_query 导致内存溢出

当我开始循环调用sql语法,比如 UPDATE ** SET ** , mysql_real_query API会导致系统内存持续不断的增长,直到测试进程崩溃或者系统崩溃。我使用top命令查看系统内存的分配情况,很奇怪的是mysqld 和我的测试程序 sqltest都没有看到内存的增加,而系统的free内存一直在减少,used内存一直在增加,最后导致系统崩溃。 代码我实在是检查过很多遍了看不出什么问题, 大神帮我看下。 ``` int ThreadExeSQL(MYSQL* lpSQLConn, char * sql, int iLen) { if (mysql_real_query(lpSQLConn, sql, iLen)) { MYSQL_RES* lpGetSQLRes = mysql_store_result(lpSQLConn); mysql_free_result(lpGetSQLRes); return -1; } //mysql_errno(lpSQLConn); //mysql_error(lpSQLConn); MYSQL_RES* lpGetSQLRes = mysql_store_result(lpSQLConn); mysql_free_result(lpGetSQLRes); // release sql memory return 0; // success } void* ThreadSQL_HexWrite(void* lpGet) { LPThreadParam getParam = (LPThreadParam)lpGet; MYSQL* lpSQLConn = (MYSQL*)&getParam->lpSQLConn; int iThreadIdx = getParam->iThreadIdx; printf("ID:%d\n", iThreadIdx); mysql_thread_init(); lpSQLConn = mysql_init(NULL); if (!mysql_real_connect(lpSQLConn, g_host_name, g_user_name, g_password, g_db_name, g_db_port, NULL, 0)) { ThreadSQLError(lpSQLConn, NULL); return; } else { printf("mysql_real_connect OK!\n"); } for (int i = 0; i < 1000000; i++) { char lpCmdStr[8192] = "\0"; sprintf(lpCmdStr, "update %s set %s=0x%d where id=%d\0", "tb_Data", "Info", i, 1); if (ThreadExeSQL(lpSQLConn, (char*)lpCmdStr, strlen(lpCmdStr))) { MySQLError getError = ThreadSQLError(lpSQLConn, NULL); HandleMySqlError(getError); return; //erroe } else { printf("ok. "); } usleep(1000 * 10); } mysql_close(lpSQLConn); mysql_thread_end(); printf("ThreadSQL_HexWrite OK!\n"); } MYSQL* g_MySQLConnList[100]; void main() { if (mysql_library_init(0, NULL, NULL)) { printf("could not initialize MySQL client library\n"); exit(1); } int thread_num = 1; //while (true) { pthread_t *pTh = new pthread_t[thread_num]; for (int i = 0; i < thread_num; i++) { LPThreadParam lpSetParam = new ThreadParam; lpSetParam->lpSQLConn = (MYSQL*)&g_MySQLConnList[i]; lpSetParam->iThreadIdx = i; printf("---create thread idx:%d\n", i); if (0 != pthread_create(&pTh[i], NULL, ThreadSQL_HexWrite, lpSetParam)) { printf("pthread_create failed\n"); continue; } } for (int i = 0; i < thread_num; i++) { pthread_join(pTh[i], NULL); } delete[] pTh; } mysql_library_end(); printf("All Done!\n"); } ```

springboot 2.0.5 +mysql5.7 +druid ,本地开发测试正常,放到生产就报错

``` ``` ** ``` Creating a new SqlSession SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@17b8c0a6] was not registered for synchronization because synchronization is not active 2019-05-07 15:32:54.236 [http-nio-8081-exec-2] INFO com.alibaba.druid.pool.DruidDataSource -{dataSource-1} inited DruidDataSource2019-05-07 15:35:01.620 [Druid-ConnectionPool-Create-906728024] ERROR com.alibaba.druid.pool.DruidDataSource -create connection SQLException, url: jdbc:mysql://169.251.179.213:3306/bbbc?useSSL=true&characterEncoding=UTF-8, errorCode 0, state 08S01 com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64) at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:835) at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:455) at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:240) at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:199) at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1510) at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1575) at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2450) Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151) at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167) at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:91) at com.mysql.cj.NativeSession.connect(NativeSession.java:152) at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:955) at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:825) ... 6 common frames omitted Caused by: java.net.ConnectException: Connection timed out (Connection timed out) at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at com.mysql.cj.protocol.StandardSocketFactory.connect(StandardSocketFactory.java:155) ```at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:65) ... 9 common frames omitted** ``` ```

MySQL连接“224”问题

在此跪求各位大佬了 环境:IDEA2017.1.3-Spring boot-jdk8-tomcat8.0-windows7 数据库用的字符集是(不能改这个,改了也没用,试过了):utf8mb4 连接远程数据库总报这个错,项目在其他电脑运行正常 网上查的更新MySQL驱动,更新了各个版本都没用 难道说我要重装系统或者换电脑了??? ``` <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.30</version> </dependency> ``` 具体报错: 2017-12-29 14:32:56.165 [http-nio-9150-exec-1] INFO org.thymeleaf.TemplateEngine.initialize:838 - [THYMELEAF] TEMPLATE ENGINE INITIALIZED 2017-12-29 14:32:57.348 [http-nio-9150-exec-4] ERROR o.a.t.jdbc.pool.ConnectionPool.log:181 - Unable to create initial connections of pool. java.sql.SQLException: Unknown character set index for field '224' received from server. at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910)

PHP-MySQL-SSH:如何在使用SSH隧道连接时从PHP连接到mysql数据库(托管在CentOS上)

<div class="post-text" itemprop="text"> <p>I'm having an issue and I don't know if it's related to the SSH tunnel but here's the deal.</p> <p>I have a simple function to connect to the database from php and it works fine locally but it doesn't work to connect to a remote server.</p> <blockquote> <p><strong>connect.php</strong></p> </blockquote> <pre><code>$dbhost = '172.1.2.3'; $dbuser = 'root'; $dbpass = 'testpass'; $db = 'testdb'; function dbconnect() { $conn = mysqli_connect($dbhost, $dbuser, $dbpass, $testdb); $conn-&gt;set_charset("utf8"); error_reporting( E_ALL &amp; ~E_DEPRECATED &amp; ~E_NOTICE ); if(!$conn) { die('We are unable to connect you to the site! --&gt; '.mysqli_error()); } else { return $conn; } } </code></pre> <p>Then, I include this file say on <strong>index.php</strong> and do the following.</p> <pre><code>&lt;?php include 'connect.php'; $conn = dbconnect(); ?&gt; //html content below </code></pre> <p>the problem I'm having is that when I do the $conn = dbconnect(); the index.php page doesn't load, I just get a blank page. if I comment out $conn = dbconnect(); then the HTML content loads just fine.</p> <p>I'm not getting error outputs on the console either so I'm a bit clueless as to what the problem might be and I don't know if it's related to the SSH tunneling which I don't know how to include it on the php connection function.</p> <p>I do however, have to use the SSH credentials to connect to the database from any mysql manager so I want to believe I am missing something in the function.</p> <p>if it helps, the server is running PHP 5.6 and mysql 5.7.22</p> <p>Any help is appreciated.</p> <p>Thanks,</p> </div>

mysql5.7如何关闭ssl?

使用官方yum源安装,由于mysql5.7默认开启了ssl,安装在centos系统中,远程可以通过windows的navicat连接,但是通过另一台centos系统的`mysql -u root -p -h ip地址`连接时,则提示:ERROR 2003 (HY000): Can't connect to MySQL server on 'IP地址' (113)(113)。所以想请教,5.7这个版本如何将ssl关闭。

问一下mysql漏洞如何打补丁

mysql漏洞怎么从官网下载补丁 注:更新mysql版本是没用的了,因为服务器是server2003版本的,我下载的mysql5.7.22放上去安装不了,官网说mysql5.7版本只支持windows7以上版本

怎么修复'ERROR 2002(HY000):无法通过套接字连接到本地MySQL服务器'/var/run/mysqld/mysqld.sock'(2“没有这样的文件或目录”)'

<div class="post-text" itemprop="text"> <p>I am trying to install docker in a laravel project. Everything seems to work, except that when I try to import data into my comic, I get this error:</p> <p>I import width command line: </p> <p><code>docker-compose exec app php artisan db:import --local</code></p> <p>I must also say that this is a large amount of data that I am trying to import</p> <blockquote> <p>ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")</p> </blockquote> <p>I did research on the internet to find a solution. I saw many but none walked with me. </p> <p>I use docker to create a development environment. Here are my configurations</p> <h3>Dockerfile</h3> <pre><code>FROM php:7.1.20-fpm # Copy composer.lock and composer.json COPY composer.lock composer.json /var/www/ # Set working directory WORKDIR /var/www # Install dependencies RUN apt-get update &amp;&amp; apt-get install -y \ build-essential \ mysql-client \ libpng-dev \ libjpeg62-turbo-dev \ libfreetype6-dev \ locales \ zip \ jpegoptim optipng pngquant gifsicle \ vim \ unzip \ git \ curl # Clear cache RUN apt-get clean &amp;&amp; rm -rf /var/lib/apt/lists/* # Install extensions RUN docker-php-ext-install pdo_mysql mbstring zip exif pcntl RUN docker-php-ext-configure gd --with-gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-png-dir=/usr/include/ RUN docker-php-ext-install gd # Install composer RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer # Add user for laravel application RUN groupadd -g 1000 www RUN useradd -u 1000 -ms /bin/bash -g www www # Copy existing application directory contents COPY . /var/www # Copy existing application directory permissions COPY --chown=www:www . /var/www # Change current user to www USER www # Expose port 9000 and start php-fpm server EXPOSE 9000 CMD ["php-fpm"] </code></pre> <h3>docker-compose</h3> <pre><code>version: '3' services: #PHP Service app: build: context: . dockerfile: .docker/Dockerfile env_file: .env image: digitalocean.com/php container_name: app #restart: unless-stopped tty: true environment: SERVICE_NAME: app SERVICE_TAGS: dev working_dir: /var/www volumes: - ./:/var/www - ./php/local.ini:/usr/local/etc/php/conf.d/local.ini networks: - app-network depends_on: - db - webserver #Nginx Service webserver: image: nginx:alpine container_name: webserver restart: unless-stopped tty: true ports: - "8000:80" - "443:443" volumes: - ./:/var/www - ./nginx/conf.d/:/etc/nginx/conf.d/ networks: - app-network #MySQL Service db: image: mysql:5.7.22 container_name: db restart: unless-stopped tty: true ports: - "13306:3306" environment: MYSQL_DATABASE: merchline MYSQL_ROOT_PASSWORD: ${DB_PASSWORD} SERVICE_TAGS: dev SERVICE_NAME: mysql volumes: - dbdata:/var/lib/mysql/ - ./mysql/my.cnf:/etc/mysql/my.cnf networks: - app-network #Docker Networks networks: app-network: driver: bridge #Volumes volumes: dbdata: driver: local </code></pre> </div>

linux系统下,mysql连接数最大能设置到多少?

linux系统下,mysql 5.7.17连接数和并发数最大能设置到多少?最大连接数默认151,可以修改,我想知道能修改到的最大数大概是多少?

mysql安装The server quit without updating PID file?

折腾了一下午找不出原因 下面是日志内容 求大神带飞 2017-03-30 04:23:00 7295 [Note] InnoDB: Using mutexes to ref count buffer pool pages 2017-03-30 04:23:00 7295 [Note] InnoDB: The InnoDB memory heap is disabled 2017-03-30 04:23:00 7295 [Note] InnoDB: Mutexes and rw_locks use InnoDB's own implementation 2017-03-30 04:23:00 7295 [Note] InnoDB: Memory barrier is not used 2017-03-30 04:23:00 7295 [Note] InnoDB: Compressed tables use zlib 1.2.3 2017-03-30 04:23:00 7295 [Note] InnoDB: Using Linux native AIO 2017-03-30 04:23:00 7295 [Note] InnoDB: Not using CPU crc32 instructions 2017-03-30 04:23:00 7295 [Note] InnoDB: Initializing buffer pool, size = 128.0M 2017-03-30 04:23:00 7295 [Note] InnoDB: Completed initialization of buffer pool 2017-03-30 04:23:00 7295 [Note] InnoDB: Highest supported file format is Barracuda. 2017-03-30 04:23:00 7295 [Note] InnoDB: 128 rollback segment(s) are active. 2017-03-30 04:23:00 7295 [Note] InnoDB: Waiting for purge to start 2017-03-30 04:23:00 7295 [Note] InnoDB: 5.6.35 started; log sequence number 1626047 2017-03-30 04:23:01 7295 [Note] Binlog end 2017-03-30 04:23:01 7295 [Note] InnoDB: FTS optimize thread exiting. 2017-03-30 04:23:01 7295 [Note] InnoDB: Starting shutdown... 2017-03-30 04:23:02 7295 [Note] InnoDB: Shutdown completed; log sequence number 1626057 2017-03-30 04:23:02 7318 [Note] InnoDB: Using mutexes to ref count buffer pool pages 2017-03-30 04:23:02 7318 [Note] InnoDB: The InnoDB memory heap is disabled 2017-03-30 04:23:02 7318 [Note] InnoDB: Mutexes and rw_locks use InnoDB's own implementatio

如何正确配置docker中的supervisor

<div class="post-text" itemprop="text"> <p>I have a working laravel environment using docker. my projects has multiple services in different container such as redis, mongodb, mysqldb and nodejs. I want to use supervisor on my project to interact with redis for the queues and php to run the job. I have done some testing and research but I really can't make it work. </p> <p>so here is my DockerFile:</p> <pre><code>FROM php:7.3-fpm # Copy composer.lock and composer.json COPY composer.lock composer.json /var/www/ # Set working directory WORKDIR /var/www # Install dependencies RUN apt-get update &amp;&amp; apt-get install -y \ build-essential \ mariadb-client \ libpng-dev \ libzip-dev \ libjpeg62-turbo-dev \ libfreetype6-dev \ locales \ zip \ jpegoptim optipng pngquant gifsicle \ vim \ unzip \ git \ curl \ cron \ supervisor # Clear cache RUN apt-get clean &amp;&amp; rm -rf /var/lib/apt/lists/* # Install extensions RUN docker-php-ext-install pdo_mysql mbstring zip exif pcntl RUN docker-php-ext-configure gd --with-gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-png-dir=/usr/include/ RUN docker-php-ext-install gd RUN docker-php-ext-configure bcmath --enable-bcmath RUN docker-php-ext-install bcmath # install mongodb ext RUN pecl install mongodb \ &amp;&amp; docker-php-ext-enable mongodb # Install composer RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer # Add user for laravel application RUN groupadd -g 1000 www RUN useradd -u 1000 -ms /bin/bash -g www www # Copy supervisor configs COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf # Copy existing application directory contents COPY . /var/www # Copy existing application directory permissions COPY --chown=www:www . /var/www COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf CMD ["/usr/bin/supervisord"] # Change current user to www USER www # Expose port 9000 and start php-fpm server EXPOSE 9000 CMD ["php-fpm"] </code></pre> <p>and my docker-compose.yml file</p> <pre><code>version: '3' services: #PHP Service php: build: context: . dockerfile: Dockerfile image: digitalocean.com/php container_name: php restart: unless-stopped tty: true environment: SERVICE_NAME: php SERVICE_TAGS: dev working_dir: /var/www volumes: - ./:/var/www - ./php/local.ini:/usr/local/etc/php/conf.d/local.ini - ./supervisord.conf:/etc/supervisor/conf.d/supervisord.conf networks: - app-network #NODEJS Service nodejs: image: node:10 container_name: nodejs restart: unless-stopped working_dir: /var/www volumes: - ./:/var/www tty: true networks: - app-network #Nginx Service nginx: image: nginx:alpine container_name: nginx restart: unless-stopped tty: true ports: - "80:80" - "443:443" volumes: - ./:/var/www - ./nginx/conf.d/:/etc/nginx/conf.d/ networks: - app-network #MySQL Service mysqldb: image: mysql:5.7.22 container_name: mysqldb restart: unless-stopped tty: true ports: - "3306:3306" environment: MYSQL_DATABASE: ${DB_DATABASE} MYSQL_USER: ${DB_USERNAME} MYSQL_PASSWORD: ${DB_PASSWORD} MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD} SERVICE_TAGS: dev SERVICE_NAME: mysql volumes: - dbdata:/var/lib/mysql - ./mysql/my.cnf:/etc/mysql/my.cnf networks: - app-network #MongoDB Service mongodb: image: mongo:3 container_name: mongodb restart: unless-stopped tty: true ports: - "27017:27017" networks: - app-network #Redis Service redis: image: redis container_name: redis restart: unless-stopped tty: true ports: - "${REDIS_PORT}:6379" networks: - app-network #Docker Networks networks: app-network: driver: bridge #Volumes volumes: dbdata: driver: local </code></pre> <p>you might also want to see my supervisord.conf</p> <pre><code>[supervisord] user=www nodaemon=true logfile=/dev/null logfile_maxbytes=0 pidfile=/var/run/supervisord.pid loglevel = INFO [unix_http_server] file=/var/run/supervisor.sock chmod=0700 username=www password=www [supervisorctl] serverurl=unix:///var/run/supervisord.sock username=www password=www [rpcinterface:supervisor] supervisor.rpcinterface_factory=supervisor.rpcinterface:make_main_rpcinterface [program:php-fpm] command = /usr/local/sbin/php-fpm autostart=true autorestart=true priority=5 stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 [program:ohwo-worker] process_name=%(program_name)s_%(process_num)02d command=php /var/www/artisan horizon autostart=false autorestart=true user=www numprocs=1 redirect_stderr=true stdout_logfile=/var/www/laravel-worker.log </code></pre> <p>so from that setup. when the containers is UP it seems that supervisord is not working because if I run <code>php artisan horizon</code> manually on my php container the queuing works perfectly. btw horizon is the tool i use for queuing. </p> <p>and then I also try to run <code>supervisorctl</code> on my php container and I got this error <code>unix:///var/run/supervisord.sock no such file</code></p> <p>so I'm just pretty new to docker just started few months ago. I do know how to configure supervisord on linux but i can't make it work on docker. </p> <p>so please pardon my stupidity :) </p> </div>

在Mac OS X El Capitan上安装php56(不赞成使用自制程序)

<div class="post-text" itemprop="text"> <p>I have a dev environment on OS X El Capitan: - homebrew - nginx - php56 - mysql - etc.</p> <p>Homebrew no longer support El Capitan, also no support php56. But my frontend at now not compatible with php7. I'm input <code>brew update &amp;&amp; brew upgrade</code>and output:</p> <pre><code>==&gt; Upgrading 7 outdated packages: git 2.20.1 -&gt; 2.21.0, httpd 2.4.37_1 -&gt; 2.4.38, mysql 5.7.22 -&gt; 8.0.15, nghttp2 1.35.1 -&gt; 1.36.0, nginx 1.15.8 -&gt; 1.15.9, openssl@1.1 1.1.1a -&gt; 1.1.1b, pcre 8.42 -&gt; 8.43 ==&gt; Upgrading openssl@1.1 ... openssl@1.1 is keg-only, which means it was not symlinked into /usr/local, because openssl/libressl is provided by macOS so don't link an incompatible version. ... ... ==&gt; Upgrading nginx ==&gt; Installing dependencies for nginx: pcre ==&gt; Reinstalling 1 broken dependent from source: curl-openssl ... </code></pre> <p>After that php does not start. I rollback to previous version all updated formulas, uninstall php. When reinstalling php56:</p> <pre><code>==&gt; Downloading https://php.net/get/php-5.6.39.tar.xz/from/this/mirror Already downloaded: ~/Library/Caches/Homebrew/downloads/6bf39b5c5c754a031a92474c066074442448c1331f50f80882ef744cf17d8fa3--php-5.6.39.tar.xz ==&gt; Patching patching file acinclude.m4 Hunk #1 succeeded at 444 (offset 3 lines). Hunk #2 succeeded at 459 (offset 3 lines). Hunk #3 succeeded at 494 (offset 3 lines). Hunk #4 succeeded at 506 (offset 3 lines). Hunk #5 succeeded at 2500 with fuzz 2 (offset 81 lines). patching file Zend/zend_compile.h patching file Zend/zend_execute.h ==&gt; ./buildconf --force Last 15 lines from ~/Library/Logs/Homebrew/php@5.6/01.buildconf: 2019-02-28 14:55:01 +0300 ./buildconf --force Forcing buildconf Removing configure caches buildconf: checking installation... buildconf: autoconf not found. You need autoconf version 2.59 or newer installed to build PHP from Git. make: *** [buildmk.stamp] Error 1 make: *** Waiting for unfinished jobs.... </code></pre> <p>autoconf installed</p> <p>Any suggestions pls?</p> </div>

MySQL慢查询处理

<div class="post-text" itemprop="text"> <p>I have an <code>AWS EC2</code> instance with <code>DUAL-CORE</code> and <code>4 GB Memory</code>. I have setup my <code>Apache2 HTTP server</code> running <code>PHP "7.0.30"</code> and <code>MySQL "Ver 14.14 Distrib 5.7.22"</code>. </p> <p>There are various devices that are sending <code>GET/POST</code> request to my <code>Http server</code>. Each post and get request using select and update queries. </p> <p>Right now, there are around <strong>200 devices</strong> which are hitting my <code>Http server</code> simultaneously and hitting <code>SQL queries</code> of select and update together. These hits contain data in <code>JSON</code> formats. </p> <p>The problem is that <strong>my MYSQL server has become too much slow</strong>. It takes long time to gather data from select queries and load pages. </p> <p>From <code>phpMyAdmin</code>, I see a number of sleep processes in status for queries. I also have tuned various parameters of my <code>SQL server</code> but no result. </p> <p>One of the major query that is taking time is update query which is updating long text data in table and is coming from device in every 60 seconds simultaneously and we see its processes empty after a long period of time in MYSQL server status. </p> <p><strong>Is there a way to optimize it using SQL parameters to keep MYSQL server fast even with 1000s of queries with multiple connections coming to update the table column having long text ?</strong> </p> <p>Most of the Global variables are with default values. I also tried changing values of Various Global variables but it didn't produce any result.</p> <p><strong>How can I reduce this slow processing of queries?</strong></p> <p>P.S: I believe the issue is due to Update queries. I have tuned Select queries and they seems fine. But, for UPDATE queries, I see sleep of upto 12 seconds in Processes tab of phpMyAdmin. </p> <p>I have added link to the image having this issue (Here, you can see sleeps of even 13 seconds, all in UPDATE queries) :</p> <p><img src="https://i.stack.imgur.com/fLjwe.png" alt=""></p> <p>Here is the PasteBin for the query of an UPDATE operation: <a href="https://pastebin.com/kyUnkJmz" rel="nofollow noreferrer">https://pastebin.com/kyUnkJmz</a></p> </div>

奇怪的未解决的PDO错误:语法错误或访问冲突:1064您的SQL语法中有错误;

<div class="post-text" itemprop="text"> <p>I have got an error in a <code>php</code> script:</p> <blockquote> <p>PHP Fatal error: Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 in /var/www/html/a.php:143</p> </blockquote> <p>Pay attention it says near <code>''</code>(two single quotations). This script used to work correctly on my previous server but when I moved to the new server, it kept showing this error. My PHP version is 7.0 and Mysql version is 5.7.22.</p> <p>How I connected to mysql:</p> <pre><code>try{ $pdo = new PDO("mysql:host=localhost;dbname=db_name", $username, $password); $pdo-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); echo "Connected successfully"; } catch(PDOException $e){ echo "Connection failed: " . $e-&gt;getMessage(); } </code></pre> <p>It prints: "Connected successfully". These are lines 142 and 143 which contain PDO queries:</p> <pre><code>$stmt = $pdo-&gt;prepare("SELECT has_paid FROM info WHERE chat_id=".$chat_id); $stmt-&gt;execute(); </code></pre> <p>I visited similar questions but they didn't help. </p> <p>How can I solve this?</p> </div>

Laravel验证电子邮件地址问题

<div class="post-text" itemprop="text"> <p>I have a problem with Laravel 5.7.22, I tried to activate the verification with the email and I get the message that: </p> <blockquote> <p>A fresh verification link has been sent to your email address.</p> </blockquote> <p>how it's properly working at least the part that send the emails with the verification link but when I click the generated link I get the following page:</p> <p><img src="https://i.stack.imgur.com/1QP0K.png" alt=""></p> <p>I have tried to erase the project and reinstall it, and I also tried to generate the signature key with this command:</p> <pre><code>php artisan key:generate </code></pre> <p>that I have found in <a href="https://stackoverflow.com/questions/53388811/laravel-5-7-email-verify-broken-link">this other question</a>, but that didn't work, I don't know what could be causing this issue.</p> <p>I also tried to debug the the function <code>hasValidSignature</code> in the file <code>UrlGenerator</code> from Laravel, just because I read that it could help, but it doesn't make sense, I haven't event altered the middleware or something I'm just with the laravel routes that it generates by default.</p> <p>The generated link looks something like this.</p> <pre><code>https://www.example.com/email/verify/1?expires=1548527438&amp;signature=daebab97afbb2da6a0f37615bc3db7e59db9c59e704d185addcf88adf46e8f6d </code></pre> <p>I also have configured my .env file properly and the files under the config folder just for security.</p> </div>

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

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

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

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

Java基础知识面试题(2020最新版)

文章目录Java概述何为编程什么是Javajdk1.5之后的三大版本JVM、JRE和JDK的关系什么是跨平台性?原理是什么Java语言有哪些特点什么是字节码?采用字节码的最大好处是什么什么是Java程序的主类?应用程序和小程序的主类有何不同?Java应用程序与小程序之间有那些差别?Java和C++的区别Oracle JDK 和 OpenJDK 的对比基础语法数据类型Java有哪些数据类型switc...

技术大佬:我去,你写的 switch 语句也太老土了吧

昨天早上通过远程的方式 review 了两名新来同事的代码,大部分代码都写得很漂亮,严谨的同时注释也很到位,这令我非常满意。但当我看到他们当中有一个人写的 switch 语句时,还是忍不住破口大骂:“我擦,小王,你丫写的 switch 语句也太老土了吧!” 来看看小王写的代码吧,看完不要骂我装逼啊。 private static String createPlayer(PlayerTypes p...

和黑客斗争的 6 天!

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

Intellij IDEA 实用插件安利

1. 前言从2020 年 JVM 生态报告解读 可以看出Intellij IDEA 目前已经稳坐 Java IDE 头把交椅。而且统计得出付费用户已经超过了八成(国外统计)。IDEA 的...

女程序员,为什么比男程序员少???

昨天看到一档综艺节目,讨论了两个话题:(1)中国学生的数学成绩,平均下来看,会比国外好?为什么?(2)男生的数学成绩,平均下来看,会比女生好?为什么?同时,我又联想到了一个技术圈经常讨...

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

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

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

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

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

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

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

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

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

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

魂迁光刻,梦绕芯片,中芯国际终获ASML大型光刻机

据羊城晚报报道,近日中芯国际从荷兰进口的一台大型光刻机,顺利通过深圳出口加工区场站两道闸口进入厂区,中芯国际发表公告称该光刻机并非此前盛传的EUV光刻机,主要用于企业复工复产后的生产线扩容。 我们知道EUV主要用于7nm及以下制程的芯片制造,光刻机作为集成电路制造中最关键的设备,对芯片制作工艺有着决定性的影响,被誉为“超精密制造技术皇冠上的明珠”,根据之前中芯国际的公报,目...

优雅的替换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中级开发

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

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

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

Python爬虫,高清美图我全都要(彼岸桌面壁纸)

爬取彼岸桌面网站较为简单,用到了requests、lxml、Beautiful Soup4

差点跪了...

最近微信又搞出了一个大利器,甚至都上了热搜,当然消息最敏捷的自媒体人,纷纷都开通了自己的视频号。01 视频号是什么呢?视频号是微信体系内的短视频,它不同...

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

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

Vue回炉重造之router路由(更新中)

你好,我是Vam的金豆之路,可以叫我豆哥。2019年年度博客之星、技术领域博客专家。主要领域:前端开发。我的微信是 maomin9761,有什么疑问可以加我哦,自己创建了一个微信技术交流群,可以加我邀请你一起交流学习。最后自己也创建了一个微信公众号,里面的文章是我自己精挑细选的文章,主要介绍各种IT新技术。欢迎关注哦,微信搜索:臻美IT,等你来。 欢迎阅读本博文,本博文主要讲述【】,文字通...

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

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

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

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

Java岗开发3年,公司临时抽查算法,离职后这几题我记一辈子

前几天我们公司做了一件蠢事,非常非常愚蠢的事情。我原以为从学校出来之后,除了找工作有测试外,不会有任何与考试有关的事儿。 但是,天有不测风云,公司技术总监、人事总监两位大佬突然降临到我们事业线,叫上我老大,给我们组织了一场别开生面的“考试”。 那是一个风和日丽的下午,我翘着二郎腿,左手端着一杯卡布奇诺,右手抓着我的罗技鼠标,滚动着轮轴,穿梭在头条热点之间。 “淡黄的长裙~蓬松的头发...

大胆预测下未来5年的Web开发

在2019年的ReactiveConf 上,《Elm in Action》的作者Richard Feldman对未来5年Web开发的发展做了预测,很有意思,分享给大家。如果你有机会从头...

大牛都会用的IDEA调试技巧!!!

导读 前天面试了一个985高校的实习生,问了他平时用什么开发工具,他想也没想的说IDEA,于是我抛砖引玉的问了一下IDEA的调试用过吧,你说说怎么设置断点...

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

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

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

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

实时更新:计算机编程语言排行榜—TIOBE世界编程语言排行榜(2020年6月份最新版)

内容导航: 1、TIOBE排行榜 2、总榜(2020年6月份) 3、本月前三名 3.1、C 3.2、Java 3.3、Python 4、学习路线图 5、参考地址 1、TIOBE排行榜 TIOBE排行榜是根据全世界互联网上有经验的程序员、课程和第三方厂商的数量,并使用搜索引擎(如Google、Bing、Yahoo!)以及Wikipedia、Amazon、YouTube统计出排名数据。

立即提问
相关内容推荐