首頁 後端開發 php教程 my.cnf文件,port端口?(急)解决方案

my.cnf文件,port端口?(急)解决方案

Jun 13, 2016 pm 01:27 PM
mysql mysqld nbsp root

my.cnf文件,,port端口??(急)
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
my.cnf文件里面就这东东,纠结了2天,找不到port,怎么去修改默认端口,求高手指点~~

------解决方案--------------------
16 # The following options will be passed to all MySQL clients
 17 [client]
 18 #password = your_password
 19 port = 3306
 20 socket = /var/lib/mysql/mysql.sock
 21 default-character-set = utf8
 22 # Here follows entries for some specific programs
 23 
 24 # The MySQL server
 25 [mysqld]
 26 port = 3306
 27 socket = /var/lib/mysql/mysql.sock
 28 skip-external-locking
 29 key_buffer_size = 384M
 30 max_allowed_packet = 1M
 31 table_open_cache = 512
 32 sort_buffer_size = 2M
 33 read_buffer_size = 2M
 34 read_rnd_buffer_size = 8M
 35 myisam_sort_buffer_size = 64M
 36 thread_cache_size = 8
 37 query_cache_size = 32M
 38 # Try number of CPU's*2 for thread_concurrency
 39 thread_concurrency = 8
 40 character_set_server = utf8
 41 skip-character-set-client-handshake
------解决方案--------------------
没有就自己加嘛
port = 3306
------解决方案--------------------

探讨

port = 3306 就直接加上?!我试试,,还有我那个my.cnf文件里面所有内容:
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
……

------解决方案--------------------
探讨
就这么点,是不是少了点??我哪里搞错了?????

------解决方案--------------------

[User:root Time:13:15:38 Path:/home/liangdong/php]$ ll /etc/my*
-rwxr-xr-x. 1 root root 4789 Apr 27 16:28 /etc/my.cnf
-rwxr-xr-x. 1 root root 19779 Apr 27 16:15 /etc/my-innodb-heavy-4G.cnf
-rwxr-xr-x. 1 root root 4671 Apr 27 16:15 /etc/my-large.cnf
-rwxr-xr-x. 1 root root 4682 Apr 27 16:15 /etc/my-medium.cnf
-rwxr-xr-x. 1 root root 2846 Apr 27 16:15 /etc/my-small.cnf

随便copy一个到my.cnf,然后配置配置就行了。
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn

熱門文章

R.E.P.O.能量晶體解釋及其做什麼(黃色晶體)
2 週前 By 尊渡假赌尊渡假赌尊渡假赌
倉庫:如何復興隊友
4 週前 By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island冒險:如何獲得巨型種子
3 週前 By 尊渡假赌尊渡假赌尊渡假赌

熱門文章

R.E.P.O.能量晶體解釋及其做什麼(黃色晶體)
2 週前 By 尊渡假赌尊渡假赌尊渡假赌
倉庫:如何復興隊友
4 週前 By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island冒險:如何獲得巨型種子
3 週前 By 尊渡假赌尊渡假赌尊渡假赌

熱門文章標籤

記事本++7.3.1

記事本++7.3.1

好用且免費的程式碼編輯器

SublimeText3漢化版

SublimeText3漢化版

中文版,非常好用

禪工作室 13.0.1

禪工作室 13.0.1

強大的PHP整合開發環境

Dreamweaver CS6

Dreamweaver CS6

視覺化網頁開發工具

SublimeText3 Mac版

SublimeText3 Mac版

神級程式碼編輯軟體(SublimeText3)

PHP 的大數據結構處理技巧 PHP 的大數據結構處理技巧 May 08, 2024 am 10:24 AM

PHP 的大數據結構處理技巧

如何優化 PHP 中的 MySQL 查詢效能? 如何優化 PHP 中的 MySQL 查詢效能? Jun 03, 2024 pm 08:11 PM

如何優化 PHP 中的 MySQL 查詢效能?

如何在 PHP 中使用 MySQL 備份和還原? 如何在 PHP 中使用 MySQL 備份和還原? Jun 03, 2024 pm 12:19 PM

如何在 PHP 中使用 MySQL 備份和還原?

如何使用 PHP 插入資料到 MySQL 表? 如何使用 PHP 插入資料到 MySQL 表? Jun 02, 2024 pm 02:26 PM

如何使用 PHP 插入資料到 MySQL 表?

Java 枚舉類型在資料庫中的應用場景有哪些? Java 枚舉類型在資料庫中的應用場景有哪些? May 05, 2024 am 09:06 AM

Java 枚舉類型在資料庫中的應用場景有哪些?

如何修復 MySQL 8.4 上的 mysql_native_password 未載入錯誤 如何修復 MySQL 8.4 上的 mysql_native_password 未載入錯誤 Dec 09, 2024 am 11:42 AM

如何修復 MySQL 8.4 上的 mysql_native_password 未載入錯誤

如何在 PHP 中使用 MySQL 預存程序? 如何在 PHP 中使用 MySQL 預存程序? Jun 02, 2024 pm 02:13 PM

如何在 PHP 中使用 MySQL 預存程序?

如何使用 PHP 建立 MySQL 表? 如何使用 PHP 建立 MySQL 表? Jun 04, 2024 pm 01:57 PM

如何使用 PHP 建立 MySQL 表?

See all articles