有道翻譯接口
有道智云
有道智云注冊賬號次坡,在左側導航欄的 “應用管理” 里創(chuàng)建應用呼猪。然后創(chuàng)建實例。獲取 應用ID 和 應用秘鑰
安裝第三方包
composer require jellybool/translug
該字段值為空砸琅,重新生成數據庫
php artisan migrate:refresh --seed
htmlspecialchars() expects parameter 1 to be string, object given
{{ url($article->slug) }}
MySQL is not running, but lock file (/var/lock/subsys/mysql[FAILED]
npm run dev 后需要重啟 mysql宋距,不知道為什么 mysql 的 pid 文件被刪除了。
MySQL server PID file could not be found! [FAILED]
/var/lock/subsys/mysql 什么功能
/etc/init.d/mysqld 文件中指定了
Lock directory for RedHat / SuSE.
lockdir='/var/lock/subsys'
lock_file_path="$lockdir/mysql"
service mysqld start
mysqld_safe A mysqld process already exists
root 20555 0.0 0.1 11772 1568 pts/1 S 11:02 0:00
/bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/usr/local/mysql/data
--pid-file=/usr/local/mysql/data/izj6cj8sn01c9l2u2e9nhqz.pid
mysql 20664 0.0 45.6 1297672 464392 pts/1 Sl 11:02 0:00
/usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
--plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=izj6cj8sn01c9l2u2e9nhqz.err
--pid-file=/usr/local/mysql/data/izj6cj8sn01c9l2u2e9nhqz.pid
[ERROR] InnoDB: Cannot allocate memory for the buffer pool
The problem is that the server does not have enough memory to allocate for MySQL process. There are a few solutions to this problem.
(1) Increase the physical RAM. Adding 1GB of additional RAM will solve the problem.
(2) Allocate SWAP space. Digital Ocean VPS instance is not configured to use swap space by default. By allocating 512MB of swap space, we were able to solve this problem. To add swap space to your server, please follow the following steps:
殺死 php-fpm
kill -INT cat /usr/local/php7/var/run/php-fpm.pid
啟動 php-fpm
/usr/local/php7/sbin/php-fpm