기본 콘텐츠로 건너뛰기

MariaDB(mysql) 명령어

DB 생성
MariaDB [(none)]> show databases;

MariaDB [(none)]> create database example_db;


MariaDB [mysql]> drop database example_db;

설치 위치 보기

SHOW VARIABLES WHERE Variable_Name LIKE "%dir"
케릭터 정보 보기
SHOW VARIABLES LIKE 'c%'


접속수 늘리기
set global max_connections=300;


[mysql]   
default-character-set=utf8

[mysqld]   
character-set-client-handshake = FALSE  
init_connect = "SET collation_connection = utf8_general_ci"  
init_connect = "SET NAMES utf8"  
character-set-server = utf8  
collation-server = utf8_general_ci  

[client]    
default-character-set = utf8  

[mysqldump]    

default-character-set = utf8

접속
$ mysql -u 사용자명 -p dbname
$ mysql> USE dbname;

테이블 생성
mysql> CREATE TABLE tablename (
column_name1 INT,
column_name2 VARCHAR(15),
column_name3 INT );

테이블 목록 보기
mysql> SHOW TABLES;

현재 상태 보기
mysql> status

오류 경고 보기
mysql> show errors;
mysql> show warnings;


작업 우분투 명령어 CentOS 명령어
시작 service mysql start service mysqld start
정지 service mysql stop service mysqld stop
재시작 service mysql restart service mysqld restart

상태확인 service mysql status service mysqld status

댓글

이 블로그의 인기 게시물

java 특정 디렉토리에 있는 파일 목록을 읽어내기, 정렬해서 가져오기

폴더 리스트 가져오기 String path="C:\"; File dirFile=new File(path); File []fileList=dirFile.listFiles(); for(File tempFile : fileList) {   if(tempFile.isFile()) {     String tempPath=tempFile.getParent();     String tempFileName=tempFile.getName();     System.out.println("Path="+tempPath);     System.out.println("FileName="+tempFileName);     /*** Do something withd tempPath and temp FileName ^^; ***/   } } 정렬해서 가져오기 import java.io.FileFilter; import java.io.IOException; import java.util.Arrays; import java.util.Date; import org.apache.commons.io.comparator.LastModifiedFileComparator; import org.apache.commons.io.filefilter.FileFileFilter; public class LastModifiedFileComparatorTest { public static void main(String[] args) throws IOException { File directory = new File("."); // get just files, not directories File[] files = directory.listFiles((FileFilter) FileFileFilter.FILE); System.out.println("Defaul...

UltraEdit Professional Version 18.20.0.1014 라이센스 키 넣기

Step 1: unpack rar archive      Step 2: run the setup   Step 3: Use the given keygen to activate    Add the line   127.0.0.1 licensing.ultraedit.com         to your %WINDOWS%\system32\drivers\etc\hosts file                 Enter any data for license-id and password (license-id must be a         number)                 Choose Offline activation and generate corresponding activation         codes for your user codes   Step 4: Enjoy and Support Developers, Buy It, They Deserved It!