linux 的mysql資料庫 資料庫的路徑的軟串連

來源:互聯網
上載者:User

標籤:--   oracle   system   table   errno   rest   mysq   near   hbase   

centos7以下

[[email protected] mysql]# service mysqld restart
Redirecting to /bin/systemctl restart  mysqld.service
[[email protected] mysql]# mysql -uroot -p123456
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 10.1.21-MariaDB MariaDB Server

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.

MariaDB [(none)]> use daochudata
Database changed
MariaDB [daochudata]> create table t(id int);
ERROR 1005 (HY000): Can‘t create table `daochudata`.`t` (errno: 13 "Permission denied")
MariaDB [daochudata]> user cardid
    -> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘user cardid‘ at line 1
MariaDB [daochudata]> use sedata1
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [sedata1]> create table t1(id int);
Query OK, 0 rows affected (0.38 sec)

MariaDB [sedata1]> drop table t1;
Query OK, 0 rows affected (0.08 sec)

MariaDB [sedata1]> create database daochudata;
Query OK, 1 row affected (0.00 sec)

MariaDB [sedata1]> use daochudata
Database changed
MariaDB [daochudata]> create table a(id int);
Query OK, 0 rows affected (0.33 sec)

MariaDB [daochudata]>
-rw-rw----. 1 mysql mysql    33243136 2月  10 16:45 zhilianzhaopin.MAI
-rw-rw----. 1 mysql mysql        6581 2月   7 11:17 zhuoyue.frm
-rw-rw----. 1 mysql mysql     7847936 2月  10 13:38 zhuoyue.MAD
-rw-rw----. 1 mysql mysql     2465792 2月  10 16:45 zhuoyue.MAI
[[email protected] sedata1]# cd ..
[[email protected] Data1]# ll
總用量 76
drwxrwxrwx. 2 mysql mysql  4096 5月  12 15:58 daochudata
drwxrwxrwx. 5 root  root   4096 2月  28 11:40 dataprocess
drwxrwxrwx. 2 mysql mysql 32768 5月  12 16:06 sedata1
drwxrwxrwx. 2 mysql mysql 16384 3月  11 08:48 sedata2
drwxrwxrwx. 2 mysql mysql 12288 4月   7 09:07 sedata3
drwxrwxrwx. 2 mysql mysql  4096 2月   4 14:28 sedata4
drwxrwxrwx. 2 mysql mysql  4096 2月   4 14:28 sedata5
[[email protected] Data1]# rm daochudata
rm: 無法刪除"daochudata": 是一個目錄
[[email protected] Data1]# rm -rf daochudata
[[email protected] Data1]# mv /var/lib/mysql/daochudata .
[[email protected] Data1]# ll
總用量 76
drwx------. 2 mysql mysql  4096 5月  12 16:08 daochudata
drwxrwxrwx. 5 root  root   4096 2月  28 11:40 dataprocess
drwxrwxrwx. 2 mysql mysql 32768 5月  12 16:06 sedata1
drwxrwxrwx. 2 mysql mysql 16384 3月  11 08:48 sedata2
drwxrwxrwx. 2 mysql mysql 12288 4月   7 09:07 sedata3
drwxrwxrwx. 2 mysql mysql  4096 2月   4 14:28 sedata4
drwxrwxrwx. 2 mysql mysql  4096 2月   4 14:28 sedata5
[[email protected] Data1]# cd /var/lib/mysql
[[email protected] mysql]# ln -s /media/Data1/daochudata/ daochudata
[[email protected] mysql]# cd daochudata
[[email protected] daochudata]# ll
總用量 104
-rw-rw----. 1 mysql mysql   433 5月  12 16:11 a.frm
-rw-rw----. 1 mysql mysql 98304 5月  12 16:11 a.ibd
-rw-rw----. 1 mysql mysql    65 5月  12 16:08 db.opt


Centos7的軟串連
[[email protected] mysql]# mysql -uroot -p123456
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 54
Server version: 10.0.28-MariaDB MariaDB Server

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| aa                 |
| datapart10         |
| dumpdata           |
| icplatform         |
| information_schema |
| jiudian            |
| mass               |
| mysql              |
| performance_schema |
| test               |
| txtdata            |
| webauth            |
| webpass            |
+--------------------+
13 rows in set (0.00 sec)

MariaDB [(none)]> create database daochudata;
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> show tables;
ERROR 1046 (3D000): No database selected
MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| aa                 |
| daochudata         |
| datapart10         |
| dumpdata           |
| icplatform         |
| information_schema |
| jiudian            |
| mass               |
| mysql              |
| performance_schema |
| test               |
| txtdata            |
| webauth            |
| webpass            |
+--------------------+
14 rows in set (0.00 sec)

MariaDB [(none)]> use daochudata;
Database changed
MariaDB [daochudata]> create table t(id int);
Query OK, 0 rows affected (0.56 sec)

MariaDB [daochudata]>






linux 的mysql資料庫 資料庫的路徑的軟串連

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.