![]() Join the nixCraft community via RSS Feed, Email Newsletter or follow on Twitter. He wrote more than 7k+ posts and helped numerous readers to master IT topics. Vivek Gite is the founder of nixCraft, the oldest running blog about Linux and open source. It is used to handle the administration of MySQL over the This is recommended package for all new MySQL database users and admins. The phpMyAdmin program act as the web-interface for MySQL. $ mysql -u bar -h vm04 -p'mypassword' foo phpMyAdmin Ssh into the vm01 or vm03 and type the following command to test the connectivity from the Apache / Lighttpd web server: Test your new db and user settings from remote vm01 or vm02 You can automate this procedure by writing shell or perl script to add the mysql user and database. You can now create tables or load data using. Mysql> GRANT ALL ON foo.* TO IDENTIFIED BY 'mypassword' You must grant access rights for this database to the MySQL user called bar through which the Apache+php5 application server will be connecting. To create your database called foo, type: Type the following commands at mysql> prompt. ![]() Type the following command to create the database and required users: ALLOW DB ACCESS FROM : localhost, vm01, and vm02 having an IP address 192.168.1.10 and 192.168.1.11 only.Use a MySQL database editor to create a new schema and execute. Open you hMail folder (C:\Program Files (x86)\hMailServer\DBScripts) Locate the 'CreateTablesMYSQL.sql' file. ![]() Once the installer gets to the step where you setup the database, just cancel the database setup. In this example, create a mysql database and user as follows: Run the installer and tell it you want to use a different database (MySQL). This section provides basic instructions for manually creating a MySQL database. # sysctl -p Creating MySQL databases and accounts Load the changes by typing the following sysctl command to modify Linux kernel parameters at runtime: # Increase system file descriptor limit to Make sure vm01 and vm02 can access the database server: # netstat -tulpn | grep :3306 MySQL database server firewall configuration Verify that mysqld running on tcp port #3306: Innodb_flush_method = O_DIRECT innodb_log_files_in_group = 2 innodb_log_file_size = 256M innodb_flush_log_at_trx_commit = 1 innodb_file_per_table = 1 innodb_buffer_pool_size = 10G Log_bin = /var/lib/mysql/mysql-bin expire_logs_days = 14 sync_binlog = 1 Max_allowed_packet = 16M max_connect_errors = 1000000 Key_buffer_size = 32M myisam_recover = FORCE,BACKUP Tmp_table_size = 12M max_heap_table_size = 12M query_cache_type = 1 query_cache_limit = 2M query_cache_size = 32M max_connections = 500 thread_cache_size = 50 open_files_limit = 65535 table_definition_cache = 4096 table_open_cache = 1024 Log_queries_not_using_indexes = 1 slow_query_log = 1 slow_query_log_file = /var/lib/mysql/slowquery.log Sort_buffer_size = 2M read_buffer_size = 2M binlog_cache_size = 1M wait_timeout = 200 interactive_timeout = 300 max_allowed_packet = 12M thread_stack = 128K table_cache = 1024 myisam_sort_buffer_size = 1M tmp_table_size = 12M max_heap_table_size = 12M # Disabling symbolic-links is recommended to prevent assorted security risks # as the following settings depends upon hardware and your requirements # Read mysqld and my.cnf man page for more info
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |