[MYSQL]원격지 SELECT

Database 2017.02.07 08:29 Posted by 애플자라

CREATE TABLE `tb_result_117` (
  `STAND_DATE` varchar(8) NOT NULL COMMENT '작업일자',
  `ITEM_CD` char(12) NOT NULL COMMENT '배치작업의 코드',
  `SUB_SECTION` varchar(32) NOT NULL COMMENT '배치작업의 코드 하부 작업(하부분류또는 파일명)',
  `START_TIME` varchar(6) NOT NULL COMMENT '시작시간',
  `END_TIME` varchar(6) DEFAULT NULL COMMENT '마감시간',
  `RESULT_MESSAGE` varchar(512) DEFAULT NULL COMMENT '처리결과 메시지',
  `TOTAL_COUNT` int(11) DEFAULT NULL COMMENT '전체건수',
  `PROCESSED_COUNT` int(11) DEFAULT NULL COMMENT '처리건수',
  `PROCESS_NAME` varchar(50) DEFAULT NULL,
  `SEND_DATE` datetime DEFAULT NULL,
  `FLAG` char(1) CHARACTER SET latin1 DEFAULT 'N',
  PRIMARY KEY (`STAND_DATE`,`ITEM_CD`,`SUB_SECTION`,`START_TIME`)
) ENGINE=FEDERATED DEFAULT CHARSET=utf8 COMMENT='일별 배치' CONNECTION='mysql://DBID:DB패스워드@DBIP:포트/dg_db_batch/tb_result';

 

참고 - http://itzone.tistory.com/672

 

[MYSQL]DB 튜닝(innodb / my.cnf)

Programing 2016.11.14 16:33 Posted by 애플자라

### DB셋팅 / 2016.11.14


# Set the SQL mode to strict
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

 

# The maximum amount of concurrent sessions the MySQL server will
# allow. One of these connections will be reserved for a user with
# SUPER privileges to allow the administrator to login even if the
# connection limit has been reached.
max_connections=1000

 

# Query cache is used to cache SELECT results and later return them
# without actual executing the same query once again. Having the query
# cache enabled may result in significant speed improvements, if your
# have a lot of identical queries and rarely changing tables. See the
# "Qcache_lowmem_prunes" status variable to check if the current value
# is high enough for your load.
# Note: In case your tables change very often or if your queries are
# textually different every time, the query cache may result in a
# slowdown instead of a performance improvement.
query_cache_size=0

 

# The number of open tables for all threads. Increasing this value
# increases the number of file descriptors that mysqld requires.
# Therefore you have to make sure to set the amount of open files
# allowed to at least 4096 in the variable "open-files-limit" in
# section [mysqld_safe]
table_cache=256

 

# Maximum size for internal (in-memory) temporary tables. If a table
# grows larger than this value, it is automatically converted to disk
# based table This limitation is for a single table. There can be many
# of them.
tmp_table_size=369M


# How many threads we should keep in a cache for reuse. When a client
# disconnects, the client's threads are put in the cache if there aren't
# more than thread_cache_size threads from before.  This greatly reduces
# the amount of thread creations needed if you have a lot of new
# connections. (Normally this doesn't give a notable performance
# improvement if you have a good thread implementation.)
thread_cache_size=8

 

#*** MyISAM Specific options

# The maximum size of the temporary file MySQL is allowed to use while
# recreating the index (during REPAIR, ALTER TABLE or LOAD DATA INFILE.
# If the file-size would be bigger than this, the index will be created
# through the key cache (which is slower).
myisam_max_sort_file_size=100G

 

# If the temporary file used for fast index creation would be bigger
# than using the key cache by the amount specified here, then prefer the
# key cache method.  This is mainly used to force long character keys in
# large tables to use the slower key cache method to create the index.
myisam_sort_buffer_size=738M

 

# Size of the Key Buffer, used to cache index blocks for MyISAM tables.
# Do not set it larger than 30% of your available memory, as some memory
# is also required by the OS to cache rows. Even if you're not using
# MyISAM tables, you should still set it to 8-64M as it will also be
# used for internal temporary disk tables.
key_buffer_size=641M

 

# Size of the buffer used for doing full table scans of MyISAM tables.
# Allocated per thread, if a full scan is needed.
read_buffer_size=64K
read_rnd_buffer_size=256K

 

# This buffer is allocated when MySQL needs to rebuild the index in
# REPAIR, OPTIMZE, ALTER table statements as well as in LOAD DATA INFILE
# into an empty table. It is allocated per thread so be careful with
# large settings.
sort_buffer_size=256K

 

# Additional memory pool that is used by InnoDB to store metadata
# information.  If InnoDB requires more memory for this purpose it will
# start to allocate it from the OS.  As this is fast enough on most
# recent operating systems, you normally do not need to change this
# value. SHOW INNODB STATUS will display the current amount used.
innodb_additional_mem_pool_size=26M

 

# If set to 1, InnoDB will flush (fsync) the transaction logs to the
# disk at each commit, which offers full ACID behavior. If you are
# willing to compromise this safety, and you are running small
# transactions, you may set this to 0 or 2 to reduce disk I/O to the
# logs. Value 0 means that the log is only written to the log file and
# the log file flushed to disk approximately once per second. Value 2
# means the log is written to the log file at each commit, but the log
# file is only flushed to disk approximately once per second.
innodb_flush_log_at_trx_commit=1

 

# The size of the buffer InnoDB uses for buffering log data. As soon as
# it is full, InnoDB will have to flush it to disk. As it is flushed
# once per second anyway, it does not make sense to have it very large
# (even with long transactions).
innodb_log_buffer_size=13M

 

# InnoDB, unlike MyISAM, uses a buffer pool to cache both indexes and
# row data. The bigger you set this the less disk I/O is needed to
# access data in tables. On a dedicated database server you may set this
# parameter up to 80% of the machine physical memory size. Do not set it
# too large, though, because competition of the physical memory may
# cause paging in the operating system.  Note that on 32bit systems you
# might be limited to 2-3.5G of user level memory per process, so do not
# set it too high.
innodb_buffer_pool_size=1243M

 

# Size of each log file in a log group. You should set the combined size
# of log files to about 25%-100% of your buffer pool size to avoid
# unneeded buffer pool flush activity on log file overwrite. However,
# note that a larger logfile size will increase the time needed for the
# recovery process.
innodb_log_file_size=622M

 

# Number of threads allowed inside the InnoDB kernel. The optimal value
# depends highly on the application, hardware as well as the OS
# scheduler properties. A too high value may lead to thread thrashing.
innodb_thread_concurrency=18

innodb_lock_wait_timeout = 1200

 

[MYSQL]DB 로그인(멀티인스턴스)

Database 2016.11.14 08:39 Posted by 애플자라

[MYSQL_HOME]/bin

 

/data1/mysql1/bin/mysql -uroot -p --socket=/tmp/mysql1-3306.sock
/data2/mysql2/bin/mysql -uroot -p --socket=/tmp/mysql2-3307.sock
/data3/mysql3/bin/mysql -uroot -p --socket=/tmp/mysql3-3308.sock

'Database' 카테고리의 다른 글

[MYSQL]원격지 SELECT  (0) 2017.02.07
[MYSQL]지니안NAC 저장장치 정보 쿼리  (0) 2017.01.23
[MYSQL]DB 로그인(멀티인스턴스)  (0) 2016.11.14
[MYSQL]LINUX 시작서비스등록  (0) 2016.11.14
[MYSQL]사용자 계정생성  (0) 2016.11.11
[MYSQL]패스워드 변경  (0) 2016.11.11

[MYSQL]LINUX 시작서비스등록

Database 2016.11.14 08:36 Posted by 애플자라

[MYSQL_HOME]/support-files/mysql.server

cp mysql.server /etc/init.d/mysqld1

[MYSQL]사용자 계정생성

Database 2016.11.11 19:39 Posted by 애플자라

[5.7 이전 버젼]
update mysql.user set password=password('새로운패스워드') where user='root';
FLUSH PRIVILEGES;

[5.7 이후 버젼]
update user set authentication_string=password('새로운패스워드') where user='root';
FLUSH PRIVILEGES;

(5.7 이후 버젼에는 password 필드가 존재하지 않는다.)
설정 후 MySQL 접속 후 명령을 실행하게 되면 다음과 같은 장애가 발생한다.

mysql> SELECT 1;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

위와 같은 오류가 발생하는 경우 다음과 같은 명령어를 실행한다.

mysql> SET PASSWORD = PASSWORD('새로운패스워드');
Query OK, 0 rows affected (0.01 sec)

mysql> SELECT 1;
+---+
| 1 |
+---+
| 1 |

 

'Database' 카테고리의 다른 글

[MYSQL]DB 로그인(멀티인스턴스)  (0) 2016.11.14
[MYSQL]LINUX 시작서비스등록  (0) 2016.11.14
[MYSQL]사용자 계정생성  (0) 2016.11.11
[MYSQL]패스워드 변경  (0) 2016.11.11
[MYSQL]multiple instances(mysqld_multi)  (0) 2016.11.08
[MYSQL]ROWNUM  (0) 2016.10.21

[MYSQL]multiple instances(mysqld_multi)

Database 2016.11.08 11:50 Posted by 애플자라

mysqld_multi: How to run multiple instances of MySQL

 

---------------------------------------------------------------- 각각 다른 폴더 반복

 

cp -R mysql-5.7.15-linux-glibc2.5-x86_64 /data1/mysql1
mkdir -p /data1/mysql1/mysqldatafile
chown -R mysql:mysql /data1
chmod -R 755 /data1
cd /data1/mysql1/bin
./mysqld_safe --defaults-file=/data1/mysql1/my.cnf --user=mysql  &

 

vi /data1/mysql1/mysqldatafile/mysql1d.log root / 임시비밀번호 확인

 

2016-11-12T04:50:43.419736Z 1 [Note] A temporary password is generated for root@localhost: EGv1IiXh%D:I
2016-11-12T04:51:13.932957Z mysqld_safe The file /usr/local/mysql/bin/mysqld

 

/data1/mysql1/bin/mysql -uroot -p --socket=/tmp/mysql1-3306.sock / DB로그인확인

 

 

1. mysql 인스턴스 확인(/data1/mysql1, /data2/mysql2, /data3/mysql3)
[root@ ~]# ps aux | grep mysqld
root       701  0.0  0.0 107464   956 pts/4    S+   08:46   0:00 grep mysqld
root      4666  0.0  0.0 108332     8 ?        S    Nov12   0:00 /bin/sh /data2/mysql2/bin/mysqld_safe --datadir=/data2/mysql2/mysqldatafile --pid-file=/tmp/mysql2d.pid
mysql     4961  0.7  0.0 1514676 35352 ?       Sl   Nov12  16:45 /data2/mysql2/bin/mysqld --basedir=/data2/mysql2 --datadir=/data2/mysql2/mysqldatafile --plugin-dir=/data2/mysql2/lib/plugin --user=mysql --log-error=/data2/mysql2/mysqldatafile/mysql2d.log --pid-file=/tmp/mysql2d.pid --socket=/tmp/mysql2-3307.sock --port=3307
root      5011  0.0  0.0 108332     8 ?        S    Nov12   0:00 /bin/sh /data3/mysql3/bin/mysqld_safe --datadir=/data3/mysql3/mysqldatafile --pid-file=/tmp/mysql3d.pid
mysql     5306  0.5  0.0 1514676 31400 ?       Sl   Nov12  13:17 /data3/mysql3/bin/mysqld --basedir=/data3/mysql3 --datadir=/data3/mysql3/mysqldatafile --plugin-dir=/data3/mysql3/lib/plugin --user=mysql --log-error=/data3/mysql3/mysqldatafile/mysql3d.log --pid-file=/tmp/mysql3d.pid --socket=/tmp/mysql3-3308.sock --port=3308
mysql     7000  0.2  0.0 1990460 252416 pts/1  Sl   Nov13   3:58 /data1/mysql1/bin/mysqld --basedir=/data1/mysql1 --datadir=/data1/mysql1/mysqldatafile --plugin-dir=/data1/mysql1/lib/plugin --user=mysql --log-error=/data1/mysql1/mysqldatafile/mysql1d.log --pid-file=/tmp/mysql1d.pid --socket=/tmp/mysql1-3306.sock --port=3306
root     14993  0.0  0.0 106372  1144 pts/1    S    Nov12   0:00 /bin/sh /data1/mysql1/bin/mysqld_safe --datadir=/data1/mysql1/mysqldatafile --pid-file=/tmp/mysql1d.pid

 

2. SSH 통한 접속방법
/data1/mysql1/bin/mysql -uroot -p --socket=/tmp/mysql1-3306.sock
/data2/mysql2/bin/mysql -uroot -p --socket=/tmp/mysql2-3307.sock
/data3/mysql3/bin/mysql -uroot -p --socket=/tmp/mysql3-3308.sock

 

3. 서비스 확인
[root@ ~]# netstat -nlp |grep mysql
tcp        0      0 :::3306                     :::*                        LISTEN      7000/mysqld        
tcp        0      0 :::3307                     :::*                        LISTEN      4961/mysqld        
tcp        0      0 :::3308                     :::*                        LISTEN      5306/mysqld        
unix  2      [ ACC ]     STREAM     LISTENING     88841  7000/mysqld         /tmp/mysql1-3306.sock
unix  2      [ ACC ]     STREAM     LISTENING     22892  4961/mysqld         /tmp/mysql2-3307.sock
unix  2      [ ACC ]     STREAM     LISTENING     23167  5306/mysqld         /tmp/mysql3-3308.sock

 

4. 엔진구동방법
1) 서비스 등록

[MYSQL_HOME]/support-files/mysql.server

cp mysql.server /etc/init.d/mysqld1

 

2) 서비스 시작/정지
/etc/init.d/service mysqld1 start/stop
/etc/init.d/service mysqld2 start/stop
/etc/init.d/service mysqld3 start/stop

 

---------------------------------------------------------------------------

 

http://xinet.kr/?p=978 - 5.7설치

 

http://dev.mysql.com/doc/refman/5.7/en/mysqld-multi.html

 

https://www.percona.com/blog/2014/08/26/mysqld_multi-how-to-run-multiple-instances-of-mysql/


https://docs.xtremecenter.co.kr/pages/viewpage.action?pageId=9340206




 

---------------------------------------------------------------------------

 

[Linux_MySQL] mysql 다중 서버 관리

 

운영체제 : Linux, Unix, Windows 등
홈페이지 : www.mysql.com
라이센스 : 상업용, GPL
소속 : 리눅스포털(주)수퍼유저코리아
제작자 : 이재석


1. mysql 다중 서버란 ?

mysqld를 소켓과 포트 데이터베이스를 달리하여
여러개의 MySQL 서버를 구동하는 것을 말한다.

myqld_safe를 이용하는 방법과 mysql_multi를 이용하는
두가지 방법이 있다.

하지만 mysqld_safe를 이용하는 것은 번거로은 면이 많아
실행시 주의를 요한다.


2. mysql 다중서버운영시 장단점

- 장애시 전체 디비서버에 영향을 미치지 않는다.
- 각 디비서버별 root사용자를 지정할 수 있다.
- 서로 상이한 설정의 디비서버를 같은 장비에서 운영가능하다.
- 하나의 mysqld로 서비스가 포화 상태인 경우


3. myqld_safe를 이용하는방법

추가로 컴파일할 필요없이 기존에 사용하는 mysqlDB를 그대로
이용가능하다.


[첫번째 mysqld의 설정파일]
[client]
port = 3306
socket = "/tmp/mysql.sock"

[mysqld]
port = 3306
socket = "/tmp/mysql.sock"

[두번째 mysqld의 설정파일]
[client]
port = 3307
socket = "/tmp/mysql2.sock"

[mysqld]
port = 3307
socket = "/tmp/mysql2.sock"


[첫번째 mysqld 실행]
# mysqld_safe --defaults-file=/etc/my.cnf &

[두번째 mysqld 실행]
# mysqld_safe
--defaults-file=/etc/my1.cnf
--pid-file=/usr/local/mysql/data/hostname.pid1
--socket=/tmp/mysql.sock1
--skip-network &

[첫번째 mysqld 접속 방법]
mysql -u [username] -p [databasename]

[두번째 mysqld 접속 방법]
mysql -u [username] -p -S [/path/to] [databasename]

4. mysql_multi를 이용하는방법 - 두개 설치(?) 해야 할듯함
[설정 방법]
[client]
(생략)...

[mysql]
(생략)...

[mysqld]
default-character-set = euc_kr
skip-name-resolve
skip-network ## only localhost access
datadir = /usr/local/mysql/data
language = /usr/local/mysql/share/mysql/english
user = mysql
(생략)...

[mysqld_multi]
mysqld = /usr/local/mysql/bin/safe_mysqld
mysqladmin = /usr/local/mysql/bin/mysqladmin
#user = root

[mysqld1]
socket = /tmp/mysql.sock1
port = 3307
datadir = /usr/local/mysql/data1
pid-file = /usr/local/mysql/data1/mysqld1.pid
log = /usr/local/mysql/data1/mysqld1.log

[mysqld2]
socket = /tmp/mysql.sock2
port = 3308
datadir = /usr/local/mysql/data2
pid-file = /usr/local/mysql/data2/mysqld2.pid
log = /usr/local/mysql/data2/mysqld2.log

[myisamchk]
(생략)...

[mysqladmin]
(생략)...

[mysqldump]
(생략)...

[실행방법]
mysql_multi 사용법
mysql_multi [OPTIONS] {start|stop|report} [GRN,GRN...]

전체 MySQL 서버실행시
mysqld_multi start

특정 MySQL 서버 실행시
mysqld_multi start 1

[다중서버 관리자 추가 하기]
#mysql -u root -S /tmp/mysql.sock -proot_password -e
"GRANT SHUTDOWN ON *.* TO multi_admin@localhost
IDENTIFIED BY 'multipass'"

위와 같이 멀티서버 어드민을 지정하여 사용가능하나 root를 사용하면 됨으로
필수 사항은 아니다.


[첫번째 mysqld 접속 방법]
mysql -u [username] -p -S [/path/to] [databasename]

[두번째 mysqld 접속 방법]
mysql -u [username] -p -S [/path/to] [databasename]


 

'Database' 카테고리의 다른 글

[MYSQL]사용자 계정생성  (0) 2016.11.11
[MYSQL]패스워드 변경  (0) 2016.11.11
[MYSQL]multiple instances(mysqld_multi)  (0) 2016.11.08
[MYSQL]ROWNUM  (0) 2016.10.21
[MYSQL]Fabric 설치 및 HA 구성  (0) 2016.10.17
[ORACLE]ORU-10027: buffer overflow  (0) 2016.10.10

[MYSQL]ROWNUM

Database 2016.10.21 09:03 Posted by 애플자라

SELECT @RNUM := @RNUM + 1 AS ROWNUM,
       EVENT_SCHEMA,
       EVENT_NAME,
       INTERVAL_FIELD,
       EVENT_DEFINITION,
       LAST_EXECUTED
FROM information_schema.EVENTS, (SELECT @RNUM := 0) R
ORDER BY LAST_EXECUTED DESC

'Database' 카테고리의 다른 글

[MYSQL]패스워드 변경  (0) 2016.11.11
[MYSQL]multiple instances(mysqld_multi)  (0) 2016.11.08
[MYSQL]ROWNUM  (0) 2016.10.21
[MYSQL]Fabric 설치 및 HA 구성  (0) 2016.10.17
[ORACLE]ORU-10027: buffer overflow  (0) 2016.10.10
[MYSQL]mysqldump 백업  (0) 2016.09.29
TAG MySQL, RNUM, Rownum

[MYSQL]mysqldump 백업

Database 2016.09.29 20:02 Posted by 애플자라

■ mysqldump 사용하는 방법

 

전체 데이터베이스 또는 특정 데이터베이스를 백업하거나 특정테이블만 백업 할 수 있다.

 

▷ 전체 데이터베이스 백업

 

- 서버의 전체 데이터베이스를 alldatabase.sql로 백업한다.

 

mysqldump -uroot -p -A > alldatabase.sql

 

▷ 특정 데이터베이스 백업

 

- test 데이터베이스만 백업한다.

 

mysqldump -uroot -p test > testdb.sql

 

▷ 특정 테이블만 백업

 

- test 데이터베이스의 board 테이블만 백업 한다.

 

mysqldump -uroot -p test board > testdbboard.sql

 

 

※ 특정 데이타베이스의 테이블생성(schema) 정보만 백업하는 방법

 

mysqldump -uroot -p --no-data test > testdbschema.sql

 

- mysqldump-? 명령어로 여러 옵션을 확인 할 수 있다.

 


▷ InnoDB에서 트리거 , 프로시져, 함수 포함하여 백업하기


  - 트리거는 default값으로 백업이 실행되나 저장 프로시져는 백업되지 않는다. 


  - 저장 프로시져가 백업되게 하기 위해서는 옵션에  --routines 을 넣어줘야 한다.  


mysqldump -u계정 -p비밀번호 --routines 특정DB명 > 함수프로시져트리거.sql


(예) mysqldump -uroot -ppassword --routines  northwind > northwind.sql

 

 

   ※ 트리거 , 프로시져, 함수 만 백업하기 - 쿼리문만  


 mysqldump -u계정 -p비밀번호 --routines  --no-create-info --no-data --no-create-db --skip-opt 특정DB명 > 함수프로시져트리거.sql 

(예) mysqldump -uroot -ppassword --routines --no-create-info --no-data --no-create-db --skip-opt northwind > northwind_only_sp_trigger_function.sql

이렇게 트리커 프로시져 함수만 백업한 경우는 반드시 Data와 테이블 스키마를 별도로 백업 받아 줘야 합니다




출처 - http://bizadmin.tistory.com/entry/MySQL-%EB%B0%B1%EC%97%85-%EB%B0%8F-%EB%B3%B5%EA%B5%AC%ED%95%98%EA%B8%B0

[MYSQL]MySQL 5.5.x Replication(MySQL 5.6 이중화)

Database 2016.09.20 14:42 Posted by 애플자라

환경 : Windows7 + Mysql5.5(Innodb)


출처 -  

http://kit2013.tistory.com/157

https://wiki.kldp.org/wiki.php/MySQL%B8%AE%C7%C3%B8%AE%C4%C9%C0%CC%BC%C7


------------------------------------------------------------------


Step4. Create a User for Replication


GRANT ALL PRIVILEGES ON *.* TO 'assetrepl'@'MYSQL_SVR1_IP' IDENTIFIED BY PASSWORD '*B59E756B80B88541E7DAD5E9BE8DB018E9AA93E1' WITH GRANT OPTION;

GRANT ALL PRIVILEGES ON *.* TO 'assetrepl'@'%' IDENTIFIED BY PASSWORD '*B59E756B80B88541E7DAD5E9BE8DB018E9AA93E1' WITH GRANT OPTION;



mysql> CREATE USER 'assetrepl'@'%' IDENTIFIED BY '패스워드';

mysql> CREATE USER 'assetrepl'@'localhost' IDENTIFIED BY '패스워드';

mysql> CREATE USER 'assetrepl'@'MYSQL_SVR1_IP' IDENTIFIED BY '패스워드';

mysql> GRANT REPLICATION SLAVE ON *.* TO 'assetrepl'@'MYSQL_SVR1_IP';


FLUSH PRIVILEGES;



Step5. Obtaining the Replication Master Binary Log Coordinates / MASTER 실행

mysql> SHOW MASTER STATUS;


mysql> FLUSH TABLES WITH READ LOCK;


mysql> UNLOCK TABLES;





Step6. Start Replication! / SLAVE 실행


mysql> CHANGE MASTER TO

MASTER_HOST = 'MYSQL_SVR2_IP',

MASTER_USER = 'assetrepl',

MASTER_PASSWORD = '패스워드',

MASTER_PORT = 13306,

MASTER_LOG_FILE = 'mysql-bin.000003',

MASTER_LOG_POS = 1325 ,

MASTER_CONNECT_RETRY = 5;



mysql > START SLAVE;


// 정지할땐 mysql> stop slave;

// slave의 경우는 셋팅이 된 이후 mysqld 가 시작될때 자동으로 같이 동작 됨.

// 자동으로 동작되는 slave를 동작하지 않게 하기 위해서는 option을 주면 됨.



mysql> stop slave;

mysql> CHANGE MASTER TO MASTER_HOST='';

mysql> RESET SLAVE;



mysql > SHOW SLAVE STATUS \G;



Start Replication! / MASTER 실행 확인!!

mysql > show slave hosts;


mysql> show processlist; ;


해보시기 바랍니다. 

이때... 

State: Slave connection: wating for binlog update 나와야 정상

[MYSQL]테이블 카운트, rows

Database 2016.09.20 09:35 Posted by 애플자라

-- 테이블 카운트

select count(*) from information_schema.tables


-- 테이블 row수 카운트

select TABLE_SCHEMA,TABLE_NAME,TABLE_ROWS,TABLE_TYPE from information_schema.tables