国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

mac m2停止mysql報(bào)錯(cuò):ERROR! MySQL server PID file could not be found!

這篇具有很好參考價(jià)值的文章主要介紹了mac m2停止mysql報(bào)錯(cuò):ERROR! MySQL server PID file could not be found!。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問。

1、確認(rèn)本機(jī)是否有my.cnf文件

出現(xiàn)這個(gè)問題的原因有很多,我只說下我是怎么解決的。
首先看一下,你的mysql服務(wù),有沒有指定配置文件。

#進(jìn)入mysql的bin目錄,和你自己的安裝位置有關(guān)系
/usr/local/mysql/bin
#執(zhí)行如下命令
mysql --verbose --help | grep my.cnf

執(zhí)行完之后,會(huì)輸出幾個(gè)可能的目錄,你可以到各個(gè)目錄下看看有沒有my.cnf文件。如果沒有,那就需要新建一個(gè)。

2、新建my.cnf文件

進(jìn)入/etc目錄,可能需要root權(quán)限,使用如下命令切換root用戶,需要輸入你進(jìn)入mac的密碼

sudo su -

然后在etc目錄下新建一個(gè)my.cnf文件,復(fù)制如下內(nèi)容到my.cnf文件中。

[client]

port                           = 3306                              # default 3306
socket                         = %SOCKET%                            # Use mysqld.sock on Ubuntu, conflicts with AppArmor otherwise


[mysql]

no_auto_rehash
max_allowed_packet             = 16M
prompt                         = '\u@\h [\d]> '                      # 'user@host [schema]> '
default_character_set          = utf8                                # Possibly this setting is correct for most recent Linux systems


[mysqldump]

max_allowed_packet             = 16M


[mysqld]

# Connection and Thread variables

port                           = 3306                                # default 3306
socket                         = %SOCKET%                              # Use mysqld.sock on Ubuntu, conflicts with AppArmor otherwise
basedir                        = %BASEDIR%
datadir                        = /usr/local/mysql/data
# tmpdir                         = '%INSTANCEDIR%/tmp'
# innodb_tmpdir                  = '%INSTANCEDIR%/tmp'                 # MySQL 5.7 ff.

max_allowed_packet             = 16M
default_storage_engine         = InnoDB
# explicit_defaults_for_timestamp = 1                                  # MySQL 5.6 ff. default in MySQL 8.0, test carefully! This can have an impact on application.
# disable_partition_engine_check  = true                               # Since MySQL 5.7.17 to 5.7.20. To get rid of nasty message in error log

# character_set_server           = utf8mb4                             # For modern applications, default in MySQL 8.0
# collation_server               = utf8mb4_general_ci


max_connections                = 151                                 # Values < 1000 are typically good
max_user_connections           = 145                                 # Limit one specific user/application
thread_cache_size              = 151                                 # Up to max_connections makes sense


# Query Cache (does not exist in MySQL 8.0 any more!)

# query_cache_type               = 1                                   # Set to 0 to avoid global QC Mutex, removed in MySQL 8.0
# query_cache_size               = 32M                                 # Avoid too big (> 128M) QC because of QC clean-up lock!, removed in MySQL 8.0


# Session variables

sort_buffer_size               = 2M                                  # Could be too big for many small sorts
tmp_table_size                 = 32M                                 # Make sure your temporary results do NOT contain BLOB/TEXT attributes

read_buffer_size               = 128k                                # Resist to change this parameter if you do not know what you are doing
read_rnd_buffer_size           = 256k                                # Resist to change this parameter if you do not know what you are doing
join_buffer_size               = 128k                                # Resist to change this parameter if you do not know what you are doing


# Other buffers and caches

table_definition_cache         = 1400                                # As big as many tables you have
table_open_cache               = 2000                                # connections x tables/connection (~2)
table_open_cache_instances     = 16                                  # New default in 5.7


# MySQL error log

log_error                      = %INSTANCEDIR%/log/%UNAME%_%INSTANCE%_error.log   # Adjust AppArmor configuration: /etc/apparmor.d/local/usr.sbin.mysqld
# log_timestamps                 = SYSTEM                              # MySQL 5.7, equivalent to old behaviour
# log_warnings                   = 2                                   # MariaDB equivalent to log_error_verbosity = 3, MySQL does NOT support this any more!
# log_error_verbosity            = 3                                   # MySQL 5.7 ff., equivalent to log_warnings = 2, MariaDB does NOT support this!
innodb_print_all_deadlocks     = 1
# wsrep_log_conflicts            = 1                                   # for Galera only!


# Slow Query Log

slow_query_log_file            = %INSTANCEDIR%/log/%UNAME%_%INSTANCE%_slow.log   # Adjust AppArmor configuration: /etc/apparmor.d/local/usr.sbin.mysqld
slow_query_log                 = 0
log_queries_not_using_indexes  = 0                                   # Interesting on developer systems!
long_query_time                = 0.5
min_examined_row_limit         = 100


# General Query Log

general_log_file               = %INSTANCEDIR%/log/%UNAME%_%INSTANCE%_general.log   # Adjust AppArmor configuration: /etc/apparmor.d/local/usr.sbin.mysqld
general_log                    = 0


# Performance Schema

# performance_schema             = ON                                  # for MariaDB 10 releases
performance_schema_consumer_events_statements_history_long = ON      # MySQL 5.6/MariaDB 10 and newer
# performance_schema_instrument  = 'memory/%=COUNTED'


# Binary logging and Replication

server_id                      = %SERVERID%                            # Must be set on MySQL 5.7 and newer if binary log is enabled!
log_bin                        = %INSTANCEDIR%/binlog/%UNAME%_%INSTANCE%_binlog            # Locate outside of datadir, adjust AppArmor configuration: /etc/apparmor.d/local/usr.sbin.mysqld
# master_verify_checksum         = ON                                  # MySQL 5.6 / MariaDB 10.2
# binlog_cache_size              = 1M                                    # For each connection!
# binlog_stmt_cache_size         = 1M                                    # For each connection!
max_binlog_size                = 128M                                # Make bigger for high traffic to reduce number of files
sync_binlog                    = 1                                   # Set to 0 or higher to get better write performance, default since MySQL 5.7
expire_logs_days               = 5                                   # We will survive Easter holidays
# binlog_expire_logs_seconds     = 432000                              # MySQL 8.0, 5 days * 86400 seconds
binlog_format                  = ROW                                 # Use MIXED if you want to experience some troubles, default since MySQL 5.7, MariaDB default is MIXED
# binlog_row_image               = MINIMAL                             # Since 5.6, MariaDB 10.1
# auto_increment_increment       = 2                                   # For Master/Master set-ups use 2 for both nodes
# auto_increment_offset          = 1                                   # For Master/Master set-ups use 1 and 2


# Slave variables

log_slave_updates              = 1                                   # Use if Slave is used for Backup and PiTR, default since MySQL 8.0
read_only                      = 0                                   # Set to 1 to prevent writes on Slave
# super_read_only                = 0                                   # Set to 1 to prevent writes on Slave for users with SUPER privilege. Since 5.7, not in MariaDB
# skip_slave_start               = 1                                   # To avoid start of Slave thread
# relay_log                      = %UNAME%_%INSTANCE%_relay-bin
# relay_log_info_repository      = TABLE                               # MySQL 5.6, default since MySQL 8.0, MySQL only
# master_info_repository         = TABLE                               # MySQL 5.6, default since MySQL 8.0, MySQL only
# slave_load_tmpdir              = '%INSTANCEDIR%/tmp'                 # defaults to tmpdir


# Crash-safe replication Master

# binlog_checksum                = CRC32                               # default
# sync_binlog                    = 1                                   # default since 5.7.6, but slow!
# innodb_support_xa              = 1                                   # default, depracted since 5.7.10


# Crash-safe replication Slave

# relay_log_info_repository      = TABLE                               # MySQL 5.6, default since MySQL 8.0, MySQL only
# master_info_repository         = TABLE                               # MySQL 5.6, default since MySQL 8.0, MySQL only
# relay_log_recovery             = 1
# sync_relay_log_info            = 1                                   # default 10000
# relay_log_purge                = 1                                   # default
# slave_sql_verify_checksum      = 1                                   # default


# GTID replication

# gtid_mode                        = ON                                  # MySQL only, Master and Slave
# enforce_gtid_consistency         = 1                                   # MySQL only, Master and Slave

# log_bin                          = %INSTANCEDIR%/binlog/%UNAME%_%INSTANCE%_binlog   # In 5.6 also on Slave
# log_slave_updates                = 1                                   # In 5.6 also on Slave


# Security variables

# local_infile                   = 0                                   # If you are security aware
# secure_auth                    = 1                                   # If you are security aware
# sql_mode                       = TRADITIONAL,ONLY_FULL_GROUP_BY,NO_ENGINE_SUBSTITUTION,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO   # Be careful changing this afterwards, NO_AUTO_CREATE_USER does NOT exist any more in MySQL 8.0
# skip_name_resolve              = 0                                   # Set to 1 if you do not trust your DNS or experience problems
# secure_file_priv               = '%INSTANCEDIR%/tmp'                   # chmod 750, adjust AppArmor configuration: /etc/apparmor.d/local/usr.sbin.mysqld


# MyISAM variables

key_buffer_size                = 8M                                  # Set to 25 - 33 % of RAM if you still use MyISAM
myisam_recover_options         = 'BACKUP,FORCE'
# disabled_storage_engines       = 'MyISAM,MEMORY'                     # MySQL 5.7, do NOT during/before mysql_upgrade, good for Galera!


# MEMORY variables

max_heap_table_size            = 64M                                 # Should be greater or equal to tmp_table_size


# InnoDB variables

innodb_strict_mode             = ON                                  # Default since MySQL 5.7, and MariaDB 10.4
innodb_buffer_pool_size        = 128M                                # Go up to 75% of your available RAM
# innodb_buffer_pool_instances   = 8                                   # Bigger if huge InnoDB Buffer Pool or high concurrency, desupported in MariaDB 10.5 ff.

innodb_file_per_table          = 1                                   # Is the recommended way nowadays
# innodb_flush_method            = O_DIRECT                            # O_DIRECT is sometimes better for direct attached storage
# innodb_write_io_threads        = 8                                   # If you have a strong I/O system or SSD
# innodb_read_io_threads         = 8                                   # If you have a strong I/O system or SSD
# innodb_io_capacity             = 1000                                # If you have a strong I/O system or SSD

innodb_flush_log_at_trx_commit = 2                                   # 1 for durability, 0 or 2 for performance
innodb_log_buffer_size         = 16M                                 # Bigger if innodb_flush_log_at_trx_commit = 0
innodb_log_file_size           = 256M                                # Bigger means more write throughput but longer recovery time
# innodb_log_files_in_group      = 2                                   # Desupported in MariaDB 10.6

                                                                     # Since MariaDB 10.0 and MySQL 5.6
innodb_monitor_enable = all                                          # Overhead < 1% according to PeterZ/Percona


# Galera specific MySQL parameter

# default_storage_engine         = InnoDB                            # Galera only works with InnoDB
# innodb_flush_log_at_trx_commit = 2                                 # Durability is achieved by committing to the Group
# innodb_autoinc_lock_mode       = 2                                 # For parallel applying
# binlog_format                  = row                               # Galera only works with RBR
# query_cache_type               = 0                                 # Use QC with Galera only in a Master/Slave set-up, removed in MySQL 8.0
# query_cache_size               = 0                                 # removed in MySQL 8.0
# log_slave_updates              = ON                                # Must be enabled on ALL Galera nodes if binary log is enabled!
# server_id                      = ...                               # Should be equal on all Galera nodes according to Codership CTO if binary log is enabled.


# WSREP parameter

# wsrep_on                       = on                                  # Only MariaDB >= 10.1
# wsrep_provider                 = /usr/lib/galera/libgalera_smm.so    # Location of Galera Plugin on Ubuntu ?
# wsrep_provider                 = /usr/lib64/galera-3/libgalera_smm.so   # Location of Galera v3 Plugin on CentOS 7
# wsrep_provider                 = /usr/lib64/galera-4/libgalera_smm.so   # Location of Galera v4 Plugin on CentOS 7
# wsrep_provider_options         = 'gcache.size = 1G'                  # Depends on you workload, WS kept for IST
# wsrep_provider_options         = 'gcache.recover = on'               # Since 3.19, tries to avoid SST after crash

# wsrep_cluster_name             = "My cool Galera Cluster"            # Same Cluster name for all nodes
# wsrep_cluster_address          = "gcomm://192.168.0.1,192.168.0.2,192.168.0.3"   # Start other nodes like this

# wsrep_node_name                = "Node A"                            # Unique node name
# wsrep_node_address             = 192.168.0.1                         # Our address where replication is done
# wsrep_node_incoming_address    = 10.0.0.1                            # Our external interface where application comes from
# wsrep_sync_wait                = 1                                   # If you need realy full-synchronous replication (Galera 3.6 and newer)
# wsrep_slave_threads            = 16                                  # 4 - 8 per core, not more than wsrep_cert_deps_distance

# wsrep_sst_method               = rsync                               # SST method (initial full sync): mysqldump, rsync, rsync_wan, xtrabackup-v2
# wsrep_sst_auth                 = sst:secret                          # Username/password for sst user
# wsrep_sst_receive_address      = 192.168.2.1                         # Our address where to receive SST


# Group Replication parameter

# default_storage_engine         = InnoDB                              # Group Replication only works with InnoDB
# server_id                      = %SERVERID%                          # Should be different on all 3 nodes
# log_bin                        = %INSTANCEDIR%/binlog/%UNAME%_%INSTANCE%_binlog   # Locate outside of datadir, adjust AppArmor configuration: /etc/apparmor.d/local/usr.sbin.mysqld
# binlog_format                  = ROW
# binlog_checksum                = NONE                                # not default!
# gtid_mode                      = ON
# enforce_gtid_consistency       = ON
# master_info_repository         = TABLE
# relay_log_info_repository      = TABLE
# log_slave_updates              = ON

# slave_parallel_workers         =                                  # 1-2/core, max. 10
# slave_preserve_commit_order    = ON
# slave_parallel_type            = LOGICAL_CLOCK

# transaction_write_set_extraction            = XXHASH64

# loose-group_replication_group_name          = "$(uuidgen)"           # Must be the same on all nodes
# loose-group_replication_start_on_boot       = OFF
# loose-group_replication_local_address       = "192.168.0.1"
# loose-group_replication_group_seeds         = "192.168.0.1,192.168.0.2,192.168.0.3"   # All nodes of Cluster
# loose-group_replication_bootstrap_group     = OFF
# loose-group_replication_single_primary_mode = FALSE                  # = multi-primary

3、修改my.cnf文件

只需要修改3處配置。兩個(gè)port,和一個(gè)datadir。
datadir一般是/usr/local/mysql/data,根據(jù)你自己的目錄情況修改即可。

4、重啟mysql、關(guān)閉mysql

重啟mysql。

/usr/local/mysql/support-files/mysql.server restart

再關(guān)閉mysql試試,應(yīng)該就可以成功了文章來源地址http://www.zghlxwxcb.cn/news/detail-486521.html

/usr/local/mysql/support-files/mysql.server stop

到了這里,關(guān)于mac m2停止mysql報(bào)錯(cuò):ERROR! MySQL server PID file could not be found!的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • 【填坑向】MySQL常見報(bào)錯(cuò)及處理系列(ERROR! The server quit without updating PID file)

    【填坑向】MySQL常見報(bào)錯(cuò)及處理系列(ERROR! The server quit without updating PID file)

    本系列其他文章 【填坑向】MySQL常見報(bào)錯(cuò)及處理系列(Communications link failure Access denied for user ‘root‘@‘localhost‘)_AQin1012的博客-CSDN博客 翻一下大致的意思就是默認(rèn)會(huì)按照如下的順序讀取配置文件,我上面貼出的配置文件就是第一個(gè)/etc/my.cnf,但顯然目前在運(yùn)行的MySQL并不是

    2024年02月11日
    瀏覽(16)
  • 【黃啊碼】mysql啟動(dòng)報(bào)錯(cuò):The server quit without updating PID file[網(wǎng)上的都是坑貨]

    大家好,我是黃啊碼,最近在手動(dòng)安裝mysql的時(shí)候遇到了一點(diǎn)問題,然后按照網(wǎng)友們的操作,沒一次成功,最終在一位大佬的指導(dǎo)下,終于解決了,特地整理如下: 原因分析:上一次關(guān)機(jī)前未正常關(guān)閉MySQL 解決方案:刪除進(jìn)程鎖文件?/var/lock/subsys/mysql? 原因分析:可能進(jìn)程里

    2024年02月01日
    瀏覽(22)
  • MySQL:提示:The server quit without updating PID file問題的解決辦法

    具體什么原因最好的辦法是先查看下錯(cuò)誤日志: 1、可能是/usr/local/mysql/data/mysql.pid文件沒有寫的權(quán)限 ?解決方法 :給予權(quán)限,然后重新啟動(dòng)mysqld! 2、可能進(jìn)程里已經(jīng)存在mysql進(jìn)程 解決方法:使用“kill -9? 進(jìn)程號(hào)”殺死,然后重新啟動(dòng)mysqld 3、可能是第二次在機(jī)器上安裝mys

    2024年01月25日
    瀏覽(23)
  • ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option 解決辦法

    ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option 解決辦法

    情景 當(dāng)我導(dǎo)入大數(shù)據(jù)量時(shí),使用 LOAD DATA INFILE 進(jìn)行導(dǎo)入,出現(xiàn)了錯(cuò)誤 ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement 表明你的 MySQL 服務(wù)器啟用了 --secure-file-priv 選項(xiàng),這個(gè)選項(xiàng)限制了 MySQL 可以執(zhí)行文件操作的目錄。這通常出現(xiàn)在嘗

    2024年04月28日
    瀏覽(25)
  • Mac M2芯片免安裝版mysql

    Mac M2芯片免安裝版mysql

    先看一下本機(jī)mac信息 左上角,單機(jī)蘋果的logo,然后單擊“關(guān)于本機(jī)”,可以看到當(dāng)前mac的信息 看這個(gè)信息的目的是:你在官網(wǎng)下載mysql的時(shí)候,不要再下載x86版本,要現(xiàn)在arm版本,因?yàn)樘O果的M2芯片是基于arm架構(gòu)。 下載mysql的路徑:https://dev.mysql.com/downloads/mysql/ 注意下載ar

    2024年02月13日
    瀏覽(23)
  • 解決遠(yuǎn)程連接MySQL報(bào)錯(cuò):2003 - Can‘t connect to MySQL server on ‘X.X.X.X‘ (10060 “Unknown error“)問題

    解決遠(yuǎn)程連接MySQL報(bào)錯(cuò):2003 - Can‘t connect to MySQL server on ‘X.X.X.X‘ (10060 “Unknown error“)問題

    問題 先看報(bào)錯(cuò): 2003 - Can’t connect to MySQL server on ‘X.X.X’ (10060 “Unknown error”)。 意思是服務(wù)器遠(yuǎn)程連接出錯(cuò):未知錯(cuò)誤。 解決方案: 遇到這個(gè)問題,首先想到的是權(quán)限不夠。那咱就給它賦權(quán)。 首先登錄MySQL數(shù)據(jù)庫(kù):mysql -u用戶名 -p密碼; 然后:use mysql; 進(jìn)入數(shù)據(jù)庫(kù)后我們先看看

    2024年02月07日
    瀏覽(32)
  • MySQL報(bào)錯(cuò)解決:Error writing file ‘/tmp/XXXX‘ (Errcode: 28 - No space left on device)

    MySQL報(bào)錯(cuò)解決:Error writing file ‘/tmp/XXXX‘ (Errcode: 28 - No space left on device)

    執(zhí)行sql報(bào)錯(cuò)如下: MySQL報(bào)錯(cuò) “Error writing file ‘/tmp/XXXX‘ (Errcode: 28 - No space left on device)” 表明在寫入文件時(shí),臨時(shí)目錄(tmpdir) 的設(shè)備上沒有足夠的可用空間 ,可能會(huì)導(dǎo)致MySQL無法執(zhí)行某些操作,如排序或臨時(shí)表的創(chuàng)建 在MySQL 8中,默認(rèn)的臨時(shí)目錄(tmpdir)路徑取決于操作系

    2024年02月11日
    瀏覽(17)
  • navicat如何連接MySQL,報(bào)錯(cuò)“2003 - Can‘t connect to MySQL server on ‘localhost‘ (10061 “Unknown error“)”處理

    navicat如何連接MySQL,報(bào)錯(cuò)“2003 - Can‘t connect to MySQL server on ‘localhost‘ (10061 “Unknown error“)”處理

    1.打開Navicat,點(diǎn)擊左上角的【連接】按鈕。 2. 新建連接,大家要注意了,此處新建的是連接,不是新建的數(shù)據(jù)庫(kù),我看到好多人都是把連接名當(dāng)成庫(kù)名寫上了,這是不對(duì)的??梢越ǘ鄠€(gè)連接的意思是比如我們可以連接本地的mysql,也可以連接開發(fā)環(huán)境服務(wù)器的mysql,或者測(cè)試環(huán)境

    2024年02月16日
    瀏覽(25)
  • mac上mysql啟動(dòng)報(bào)錯(cuò)問題Unable to lock ./ibdata1 error: 35

    mac上mysql啟動(dòng)報(bào)錯(cuò)問題Unable to lock ./ibdata1 error: 35

    ? ? 記錄一次mac安裝mysql啟動(dòng)報(bào)錯(cuò)問題Unable to lock ./ibdata1 error: 35。首先,這是第一次在公司新領(lǐng)的mac上面去安裝mysql,在去年換新電腦之前,老電腦也安裝過,沒出現(xiàn)過這種問題。其次,自己的幾臺(tái)windows筆記本也安裝過,也沒出現(xiàn)過這樣的問題。 目錄 一、mysql首次安裝后啟動(dòng)

    2024年02月16日
    瀏覽(20)
  • ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot exec

    MySQL在進(jìn)行導(dǎo)出全表數(shù)據(jù)的時(shí)候提示ERROR 1290 出現(xiàn)這個(gè)問題的原因是mysql的secure_file_prive這個(gè)選項(xiàng)沒有開啟,或者這個(gè)選擇了特定的文件路徑,只有在這個(gè)文件路徑下的文件才能導(dǎo)入導(dǎo)出mysql 首先在mysql環(huán)境下查詢secure_file_priv參數(shù)。 參數(shù)secure_file_priv的值及含義如下: secure_fil

    2024年02月10日
    瀏覽(24)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包