本文目錄一覽:
電腦中沒有mysql服務
一般電腦上都沒有這個MYSQL服務,需要的話,請自行安裝MYSQL軟件,才會有這個服務的。
服務沒有mysql
你安裝了mysql沒有,沒有就先安裝,安裝好mysql以後,在bin目錄下有個mysqld.exe,運行這個程序就可以添加mysql服務,但是運行這個程序需要使用參數,否則就會以命令行窗口形式啟動MYSQL數據庫,命令參數如下:
安裝服務(MySQL)的命令:
mysqld.exe –install
可以指定服務的名字,例如:
mysqld.exe –install MySQL5
以上命令安裝的服務是開機自動運行,如果開機不自動啟動,那麼參數如下:
mysqld.exe –install-manual
這樣就需要使用下面的命令啟動服務:
net start MySQL
刪除服務的命令是:
mysqld.exe –remove
本地服務中沒有mysql 也無法安裝mysql
本地不安裝mysql 服務器是可以的。
但是至少要安裝客戶端。
再至少, 也要安裝一個 ODBC 的驅動。
否則 總不能什麼驅動沒有, 然後用 Access 連接 MySQL 吧?
下面這種情況, 是 連接本機的 MySQL
前提是 本機安裝了 MySQL , 並開啟了 MySQL 的服務。
E:\MySQL\MySQL Server 5.1\binmysql -u root -p
Enter password: ********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.1.50-community MySQL Community Server (GPL)
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
mysql
下面這種情況, 是 本機只有客戶端, 沒有運行服務程序。
連接的是 另外一台機器上面的 MYSQL 數據庫, 本機是沒有數據庫的。
F:\mysql-4.1.10a-win32\binmysql -u test_user -h 192.168.56.101 -p
Enter password: ************
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8 to server version: 5.0.96-community-nt
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
mysql
原創文章,作者:小藍,如若轉載,請註明出處:https://www.506064.com/zh-hant/n/249840.html