1. 1 zypper search mysql*
1.2 zypper install mysql-community-server
預設目錄:
可執行檔案目錄:/usr/bin/mysql
配置檔案目錄:/etc/mysql
/資料存放目錄:/var/lib/mysql/
配置檔案目錄:/usr/share/mysql
/usr/share/man/man1/mysql.1.gz
2,啟動服務
serveice mysql start
停止服務
service mysql stop
3,客戶端操作
>mysql -u root -p
4.增加使用者及許可權(
否則外部主機無法訪問到該資料庫伺服器)
授權法。例如,你想myuser
使用mypassword
從任何主機連線到
mysql
伺服器的話。
1.1 grant all on *.* to 'baseuser'@'%' identified by 'base0001'
grant all privileges on *.* to 'baseuser'@'%' identified by 'base0001' with grant option;
如果你想允許使用者myuser從ip
為192.168.1.3
的主機連線到
mysql
伺服器,並使用
mypassword
作為密碼
grant all privileges on *.* to 'root'@'192.168.1.3'
identified by 'mypassword' with grant option;
grant all privileges on *.* to 'root'@'10.10.40.54'
identified by '123456' with grant option;
5.修改root密碼
整理了以下四種在mysql
中修改root
密碼的方法
,可能對大家有所幫助
!方法1
: 用set password
命令mysql -u root
mysql> set password for 'root'@'localhost' = password('newpass');
方法2:用
mysqladmin
mysqladmin -u root password "newpass"
如果root
已經設定過密碼,採用如下方法
mysqladmin -u root password oldpass "newpass"
方法3: 用
update
直接編輯
user
表mysql -u root
mysql> use mysql;
mysql> update user set password = password('newpass') where user = 'root';
mysql> flush privileges;
在丟失root
密碼的時候,可以這樣
mysqld_safe --skip-grant-tables&
mysql -u root mysql
mysql> update user set password=password("new password") where user='root';
mysql> flush privileges;
資料庫複製和備份
配置檔案:
讓mysql
不區分表名大小寫的方法其實很簡單:
1.用root
登入,修改
/etc/my.cnf
2.在[mysqld]
下加入一行:
lower_case_table_names=1
3.重新啟動資料庫即可
注意:(有可能會出錯
)如果資料庫已存在,有bug.
在opensuse安裝collaboa記
乙個用ror寫的版本管理與bug跟蹤系統。1 安裝svn,opensuse自帶的了svn。2 安裝swig,swig是乙個介面編譯器,用來 連線c c 和 perl pyhon ruby 等.google了一下沒有找到opensuse對應的 測試一下.irb irb main 001 0 requi...
在OpenSUSE下編譯安裝Nginx
在nginx官網上選擇穩定的版本nginx。解壓到 usr local src 目錄。筆者使用的是nginx 1.9.9。進入 usr local src繼續操作 安裝 configure make make install 高版本會出現no rule to make target libpcre....
opensuse 在 Wayland 中啟用輸入法
當我在選擇了kde wayland 環境的時候,fcitx輸入法不能夠使用了。網上有很多教你怎麼在登陸時啟用輸入法的,基本都是教你修改x的配置檔案,然而wayland並不讀取x的配置檔案。你需要在 etc environment修改配置檔案。input method fcitx gtk im mod...