tag:blogger.com,1999:blog-7188813081599719537.post8215692433759466930..comments2024-02-24T10:09:27.699+07:00Comments on FAMILUG: Cài đặt, cấu hình, quản trị mysql-serverAnonymoushttp://www.blogger.com/profile/08856674198501587219noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-7188813081599719537.post-31833229875253852582013-03-18T23:20:28.154+07:002013-03-18T23:20:28.154+07:00Thử nghiệm với mariadb 5.5.30(opensource software ...Thử nghiệm với mariadb 5.5.30(opensource software phát triển từ mysql, sau khi oracle mua mysql, đóng vai trò thay thế cho mysql của oracle, mọi thứ đều giống hệt ngoài các tính năng cải tiến) thấy client có hỗ trợ autocomplete tên các database, table, field Hhttps://www.blogger.com/profile/18301396724192709702noreply@blogger.comtag:blogger.com,1999:blog-7188813081599719537.post-91133766648397240352013-03-18T22:38:38.171+07:002013-03-18T22:38:38.171+07:00NOTE: các tên bảng tên cột nên có dấu backstick ``...NOTE: các tên bảng tên cột nên có dấu backstick `` bao quanh để tránh việc trùng với từ khóa. VD khi muốn tạo cột tên là type, phải sử dụng `type` Hhttps://www.blogger.com/profile/18301396724192709702noreply@blogger.comtag:blogger.com,1999:blog-7188813081599719537.post-2697068419113451432013-03-18T22:37:04.066+07:002013-03-18T22:37:04.066+07:00Lợi ích của việc sử dụng thành thạo mysql client q...Lợi ích của việc sử dụng thành thạo mysql client quá rõ ràng. Không bao giờ cần tới phpmyadmin, có thể tự động hóa công việc bằng shell script...<br />Hiểu thêm về mysql mỗi khi gõ lệnh.<br />Với giao diện web, ít khi bạn để ý đến engine hay charset và cũng ko biết gõ nó thế nào. Đây là một ví dụ để tạo 1 table sử dụng engine là innodb và charset là utf8;<br /><br />mysql><br />CREATE TABLE `virtual_domains` (<br /> `id` int(11) NOT NULL auto_increment,<br /> `name` varchar(50) NOT NULL,<br /> PRIMARY KEY (`id`)<br />) ENGINE=InnoDB DEFAULT CHARSET=utf8;Hhttps://www.blogger.com/profile/18301396724192709702noreply@blogger.comtag:blogger.com,1999:blog-7188813081599719537.post-1099889336689690592013-01-22T16:24:03.306+07:002013-01-22T16:24:03.306+07:00Xóa nhiều database bằng 3 dòng bash script:
https:...Xóa nhiều database bằng 3 dòng bash script:<br />https://gist.github.com/4593285hvnhttps://www.blogger.com/profile/09033151657280444867noreply@blogger.comtag:blogger.com,1999:blog-7188813081599719537.post-20758775988486614372013-01-22T15:19:57.759+07:002013-01-22T15:19:57.759+07:00UPDATE: việc xóa 2 user default ‘’ giúp các user @...UPDATE: việc xóa 2 user default ‘’ giúp các user @'%' có thể login vào được cả từ local. Một cách khác để thực hiện việc này là với mỗi user cần truy cập từ localhost, ta tạo một user@localhost. VD: muốn user hvn login được từ localhost, ta tạo tài khỏan 'hvn'@'localhost' với password của 'hvn'@'%'. Cách này được openstack sử dụng, họ giải thích như sau:<br /><br />By default, MySQL will create entries in the user table with User='' and Host='localhost'. The User='' acts as a wildcard, matching all users. If you do not have the 'keystone'@'localhost' account, and you try to log in as the keystone user, the precedence rules of MySQL will match against the User='' Host='localhost account before it matches against the User='keystone' Host='%' account. This will result in an error message that looks like:<br /><br />ERROR 1045 (28000): Access denied for user 'keystone'@'localhost' (using password: YES)<br /><br />Thus, we create a separate User='keystone' Host='localhost' entry that will match with higher precedence. hvnhttps://www.blogger.com/profile/09033151657280444867noreply@blogger.comtag:blogger.com,1999:blog-7188813081599719537.post-13801455509857447292013-01-17T11:43:56.280+07:002013-01-17T11:43:56.280+07:00Update : xóa user, automysqlbackupUpdate : xóa user, automysqlbackupHhttps://www.blogger.com/profile/18301396724192709702noreply@blogger.com