BMS-HOSxP Community
HOSxP => MySQL => ข้อความที่เริ่มโดย: lovenongkhae ที่ กรกฎาคม 12, 2010, 20:41:10 PM
-
จะทำ Server ใหม่ ติดตั้ง CentOS 4.8 64 Bit เลือก Package น้อยสุด+ Percona-Server-server-51-5.1.47 ไม่สำเร็จสักที ลงหลายครั้งแล้วครับ จะขึ้น Error ประมาณนี้ครับ
[root@nongkhae ~]# cd Mysql bash: cd: Mysql: No such file or directory
[root@nongkhae ~]# ls anaconda-ks.cfg Desktop install.log install.log.syslog MySQL
[root@nongkhae ~]# cd MySQL
[root@nongkhae MySQL]# ls
limits.conf
my.cnf
Percona-Server-client-51-5.1.47-rel11.1.51.rhel4.x86_64.rpm
Percona-Server-devel-51-5.1.47-rel11.1.51.rhel4.x86_64.rpm
Percona-Server-server-51-5.1.47-rel11.1.51.rhel4.x86_64.rpm
Percona-Server-shared-51-5.1.47-rel11.1.51.rhel4.x86_64.rpm
rc.local
[root@nongkhae MySQL]# rpm -ivh Percona-Server-client-51-5.1.47-rel11.1.51.rhel4.x86_64.rpm --nodeps --force
warning: Percona-Server-client-51-5.1.47-rel11.1.51.rhel4.x86_64.rpm: V3 DSA signature: NOKEY, key ID cd2efd2a
Preparing...
########################################### [100%]
1:Percona-Server-client-5########################################### [100%]
[root@nongkhae MySQL]# rpm -ivh Percona-Server-shared-51-5.1.47-rel11.1.51.rhel4.x86_64.rpm --nodeps --force
warning: Percona-Server-shared-51-5.1.47-rel11.1.51.rhel4.x86_64.rpm: V3 DSA signature: NOKEY, key ID cd2efd2a
Preparing... ########################################### [100%]
1:Percona-Server-shared-5########################################### [100%]
[root@nongkhae MySQL]# rpm -ivh Percona-Server-server-51-5.1.47-rel11.1.51.rhel4.x86_64.rpm --nodeps --force
warning: Percona-Server-server-51-5.1.47-rel11.1.51.rhel4.x86_64.rpm: V3 DSA signature: NOKEY, key ID cd2efd2a
Preparing... ########################################### [100%]
1:Percona-Server-server-5########################################### [100%]
Warning: World-writable config file '/etc/my.cnf' is ignored
Warning: World-writable config file '/etc/my.cnf' is ignored
Warning: World-writable config file '/etc/my.cnf' is ignored
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h
nongkhae password 'new-password'
Alternatively you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default.
This is
strongly recommended for production servers.
See the manual for more instructions.
Please report any problems with the /usr/bin/mysqlbug script!
For commercial support please contact Percona at http://www.percona.com/contacts.html
Notes regarding SELinux on this platform:
=========================================
The default policy might cause server startup to fail because it is
not allowed to access critical files. In this case, please update
your installation.
The default policy might also cause inavailability of SSL related
features because the server is not allowed to access /dev/random
and /dev/urandom.
If this is a problem, please do the following:
1) install selinux-policy-targeted-sources from your OS vendor
2) add the following two lines to /etc/selinux/targeted/src/policy/domains/program/mysqld.te:
allow mysqld_t random_device_t:chr_file read;
allow mysqld_t urandom_device_t:chr_file read;
3) cd to /etc/selinux/targeted/src/policy and issue the following command:
make load
Warning: World-writable config file '/etc/my.cnf' is ignored
Warning:
World-writable config file '/etc/my.cnf' is ignored
Starting MySQL.[ OK ]
Giving mysqld 2 seconds to start
[root@nongkhae MySQL]#
-
สร้าง Database กับ grant สิทธิ์ ก็ได้ แต่ Connect ไม่ได้
ตอนนี้ ฝาก อ.ขวด ดูให้อยู่ (อาศัยอยู่ใกล้) ฝากท่าเทพทั้งหลายช่วยวิเคระห์ด้วยครับ
อันนี้ My.cnf ครับ
-
ต้องส่งไฟล์นี์มาให้ดูด้วยครับ
/var/lib/mysql/ Hostname.err
-
innodb_file_per_table
innodb_buffer_pool_size = 1500M
innodb_additional_mem_pool_size = 24M
nnodb_log_file_size = 512M
innodb_log_buffer_size = 8M
innodb_log_files_in_group = 2
ตก i ไปตัวหนึ่งครับ
มันแจ้งไว้ตรงนี้ครับ
Warning: World-writable config file '/etc/my.cnf' is ignored
-
[client]
port = 3306
socket = /var/lib/mysql/mysql.sock
default-character-set=tis620
[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
big-tables
default-character-set=tis620
skip-name-resolve
skip-character-set-client-handshake
init_connect = 'SET NAMES tis620'
max_connection = 500
#max_connect_errors = 10
#wait_timeout = 600
concurrent_insert = 2
table_cache = 1700
max_allowed_packet = 256M
max_heap_table_size = 64M
#binlog_cache_size = 1M
sort_buffer_size = 1M
join_buffer_size = 2M
thread_cache_size = 8
thread_concurrency = 8
query_cache_size = 256M
#query_cache_limit = 2M
#transaction_isolation = REPEATABLE-READ
tmp_table_size = 96M
key_buffer = 320M
read_buffer_size = 1M
read_rnd_buffer_size = 2M
myisam_sort_buffer_size = 128M
innodb_data_home_dir = /var/lib/mysql/
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /var/lib/mysql/
innodb_file_per_table
innodb_buffer_pool_size = 1500M
innodb_additional_mem_pool_size = 24M
innodb_log_file_size = 512M
innodb_log_buffer_size = 8M
innodb_log_files_in_group = 2
innodb_thread_concurrency = 8
innodb_flush_method = O_DIRECT
innodb_flush_log_at_trx_commit = 2
innodb_doublewrite = 0
innodb_support_xa = 0
innodb_open_files = 1000
innodb_locks_unsafe_for_binlog = 1
innodb_lock_wait_timeout = 50
#***Extra-DB Only***
innodb_adaptive_checkpoint = 1
innodb_io_capacity = 10000
innodb_write_io_threads = 16
innodb_read_io_threads = 16
#***Extra-DB Only***
[mysqldump]
quick
max_allowed_packet = 512M
allow-keywords
[mysql]
no-auto-rehash
default-character-set=tis620
[isamchk]
key_buffer = 224M
sort_buffer_size = 224M
read_buffer = 2M
write_buffer = 2M
[myisamchk]
key_buffer = 224M
sort_buffer_size = 224M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout
#[xtrabackup]
#target_dir = /mysqlbackup
#datadir = /var/lib/mysql
-
ยังไม่ได้ปิด firewall และ SElinux หรือเปล่าครับ
-
ขอบคุณมากครับ เดี๋ยวพรุ่งนี้ จะลองแก้ my.cnf แล้ว
จะส่ง /var/lib/mysql/ Hostname.err มาให้ดูครับ
Spect Server ครับ
IBM SERVER Xeon
RAM 3 GB. (1 gb.X2,512 MB.X2)
HDD 500 GB. SATA II
-
ยังไม่ได้ปิด firewall และ SElinux หรือเปล่าครับ
ปิดแล้ว Restart ก็ยังเหมือนเดิม ก่อนเที่ยงลองลง Cent OS 5.5 64 bit กับ Percona Extra DB ก็ยังเป็นเหมือนเดิม น่าจะเป็นสาเหตุจาก my.cnf เดี๋ยวพรุ่งนี้ลองใหม่ครับ
-
มันแจ้งไว้ตรงนี้ครับ
Warning: World-writable config file '/etc/my.cnf' is ignored
ลืมอนุญาตมากกว่านะครับ
chmod 744 /etc/my.cnf
ยังไม่ได้ปิด firewall และ SElinux หรือเปล่าครับ
ถ้าลืม mysql จะไม่ทำงาน
กรรมหนอกรรม
-
ขอบคุณทั้งสองท่านครับ
-
มันแจ้งไว้ตรงนี้ครับ
Warning: World-writable config file '/etc/my.cnf' is ignored
ลืมอนุญาตมากกว่านะครับ
chmod 744 /etc/my.cnf
ยังไม่ได้ปิด firewall และ SElinux หรือเปล่าครับ
ถ้าลืม mysql จะไม่ทำงาน
กรรมหนอกรรม
ส่วนอันนีเป็นหลังจากลง Cent OS 5.5 64 Bit + Percona Exta DB
root@nongkhae ~]# service mysql restart
Warning: World-writable config file '/etc/my.cnf' is ignored
Warning:
World-writable config file '/etc/my.cnf' is ignored
Warning:
World-writable config file '/etc/my.cnf' is ignored
Warning:
World-writable config file '/etc/my.cnf' is ignored
Shutting down MySQL....... [ OK ]
Warning: World-writable config file '/etc/my.cnf' is ignored
Warning: World-writable config file '/etc/my.cnf' is ignored
Starting MySQL. [ OK ]
[root@nongkhae ~]# mysql_upgrade
Warning: World-writable config file '/etc/my.cnf' is ignored
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Running 'mysqlcheck with default connection
arguments
Running 'mysqlcheck with default connection arguments
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
mysql.general_log
Error : You can't use locks with log tables.
status : OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.servers OK
mysql.slow_log
Error : You can't use locks with log tables.
status : OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
Running 'mysql_fix_privilege_tables'...
OK
[root@nongkhae ~]# mysql
Warning: World-writable config file '/etc/my.cnf' is ignored
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 5.1.43-51 Percona SQL Server (GPL), XtraDB 9.1, Revision 57
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create database hos;
Query OK, 1 row affected (0.06 sec)
mysql> grant all on *.* to hos@'sa' identified by 'sa' with grant option;
Query OK, 0 rows affected (0.00 sec)
mysql> grant super on *.* to hos@'sa' identified by 'sa';
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql>
[root@nongkhae ~]# service mysql status
Warning: World-writable config file '/etc/my.cnf' is ignored
Warning: World-writable config file '/etc/my.cnf' is ignored
MySQL running (3989) [ OK ]
[root@nongkhae ~]#
แสดงว่าผมต้อง chmod 744 /etc/my.cnf
กับ เพิ่ม i ตรงนี้ nnodb_log_file_size = 512M
จะใช้ได้ใช่ไหมครับ
-
แสดงว่าผมต้อง chmod 744 /etc/my.cnf
กับ เพิ่ม i ตรงนี้ nnodb_log_file_size = 512M
จะใช้ได้ใช่ไหมครับ
ยังไม่ได้ทำหรือครับ น่าจะทำดูนะครับ
-
ปิดเครื่องตั้งแต่เที่ยงแล้วครับ ไปประชุมที่ สสจ.เลยไม่ได้ทำต่อ copy error ไว้มาถาม อ.ผู้รู้ครับ
-
;D ;D ;D ดูตรง my.cnf มีอะไรพิมพ์ตกรึป่าวครับ เช่น [client] ต้องเป็นแบบนี้ไม่ใช่ client]
-
แก้ไขแล้ว mysql start ได้แล้วครับ
ปิด Firewall กับ selinux แล้ว
แต่ก็ยังไม่ได้รับอนุญาตให้ Connect Mysql Database ครับ
[root@nongkhae ~]# chmod 744 /etc/my.cnf
[root@nongkhae ~]# service mysql restart
Shutting down MySQL. [ OK ]
Starting MySQL. [ OK ]
[root@nongkhae ~]#
[root@nongkhae ~]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[ OK ]
[root@nongkhae ~]#
อันนี้เป็น host.err
-
สำเร็จแล้วครับ
สรุปจบที่ Cent OS 64 BiT+ Percona-Server-client-51-5.1.47
ขอบคณ อ.ทุกท่านที่ช่วยลุ้น โดยเฉพาะ อ.ขวด อ.อ๊อด อ.บอย อ.มด
กำลัง Restore ข้อมูลอยู่ครับ
-
ยินดีด้วยครับ :D
-
สำเร็จแล้วครับ
สรุปจบที่ Cent OS 64 BiT+ Percona-Server-client-51-5.1.47
ขอบคณ อ.ทุกท่านที่ช่วยลุ้น โดยเฉพาะ อ.ขวด อ.อ๊อด อ.บอย อ.มด
กำลัง Restore ข้อมูลอยู่ครับ
ยินดีด้วยครับ รับรองถ้ายิ่ง ติดตั้งเยอะๆ จะคล่องๆเองครับ ;D ;D ;D
-
ยินดีด้วยครับ :D
ขอบคุณครับ
restore ข้อมูลเสร็จ จะลอง Log เข้าใช้งานสักหน่อย ผ่านไปหลายหน้า
ผลปรากฏว่า ขึ้นข้อความประมาณว่า Date time did not set to thai แล้วก็ออกจาก HOSxP เฉยเลย
ใช้ Windows 7 Hosxp 53.6.28b
งานเลิกเสียก่อนพรุ่งนี้จัดการต่อครับ คงจะต้องไปดูตัว Server หลักว่า ตั้งไว้อย่างไร
-
สำเร็จแล้วครับ
สรุปจบที่ Cent OS 64 BiT+ Percona-Server-client-51-5.1.47
ขอบคณ อ.ทุกท่านที่ช่วยลุ้น โดยเฉพาะ อ.ขวด อ.อ๊อด อ.บอย อ.มด
กำลัง Restore ข้อมูลอยู่ครับ
ยินดีด้วยครับ รับรองถ้ายิ่ง ติดตั้งเยอะๆ จะคล่องๆเองครับ ;D ;D ;D
ตามนั้นครับผม ;D ;D ;D ;D ;D
-
อาการแบบนี้เลยครับ แต่เปลี่ยนไป Connect Sever จริง ปกติครับ
http://hosxp.net/index.php?option=com_smf&Itemid=28&topic=13417.msg97104 (http://hosxp.net/index.php?option=com_smf&Itemid=28&topic=13417.msg97104)
-
ปรับ date time ให้เป็น thai format ครับใน regional and language
-
สำเร็จแล้วครับ
สรุปจบที่ Cent OS 64 BiT+ Percona-Server-client-51-5.1.47
ขอบคณ อ.ทุกท่านที่ช่วยลุ้น โดยเฉพาะ อ.ขวด อ.อ๊อด อ.บอย อ.มด
กำลัง Restore ข้อมูลอยู่ครับ
ยินดีด้วยนะครับ
ยินดีด้วยครับ รับรองถ้ายิ่ง ติดตั้งเยอะๆ จะคล่องๆเองครับ ;D ;D ;D
ประสบการณ์จะสอนท่านเอง
-
;D ;D ;D ;D ;D
-
สุดท้าย ต้องลง Windows 7 ใหม่ เพราะ Connect กับ HOSxP ตัวหลักก็อาการเดียวกัน
ตอนนี้ลอง Restore from file Back Up ขนาด 500 Mb. ผ่าน Windows 7 ใช้เวลาประมาณ 1.20 ช.ม
-
วันนี้ทดลองใหม่ครับ
ลง Cent OS 4.8 64 BIT + Percona-XtraDB-server-51-5.1.43-9.1.rhel4.x86_64
โดย วิธีของ อ.ขวด ตอนนี้ Boot ให้อยู่ ใน Text Mode
Restore ข้อมูลช่วงลงไปพักเที่ยง ขึ้นมาไม่ถึงบ่ายโมงก็เสร็จครับ
ปรับ HOSxP เป็น Version 3.53.7.14b กำลัง Upgrade Stucktuer เสร็จแล้วจะ Replicate
จาก Server หลัก มาเครื่องนี้เลยครับ
ครั้งแรก CentOS 4.7 + Percona Server
-
ปัจจุบัน Cent OS 4.8 64 BIT + Percona-XtraDB-server-51-5.1.43-9.1.rhel4.x86_64
-
วันนี้ทดลองใหม่ครับ
ลง Cent OS 4.8 64 BIT + Percona-XtraDB-server-51-5.1.43-9.1.rhel4.x86_64
โดย วิธีของ อ.ขวด ตอนนี้ Boot ให้อยู่ ใน Text Mode
Restore ข้อมูลช่วงลงไปพักเที่ยง ขึ้นมาไม่ถึงบ่ายโมงก็เสร็จครับ
ปรับ HOSxP เป็น Version 3.53.7.14b กำลัง Upgrade Stucktuer เสร็จแล้วจะ Replicate
จาก Server หลัก มาเครื่องนี้เลยครับ
ครั้งแรก CentOS 4.7 + Percona Server
พยายามฝึกและเรียนรู้กับ อ.ขวด นะครับ อ.เขาเป็นคนสอนและให้คำปรึกษาที่ดีมากเลย
ผมเป็นหลายๆอย่าง จาก อ.ขวด เป็นอ.ที่ผมนับถือที่สุด เก่งในฝักมากๆเลย
-
ถูกต้องเลยครับ อ.บอย ผมก็ไปจู่โจมได้คู่มือขั้นตอนการ Set MySQL มาจาก อ.ขวด แล้วมาลองผิดลองถูกลองลงโปรแกรมเปลี่ยนไปเปลี่ยนมา 4 - 5 ครั้ง ตอนนี้คิดว่าพอลงได้แล้วครับ
HOSxP FORUM เป็นอะไรที่ทุกคนเต็มใจให้กันแบบไม่ปิดบังเลย มีการพัฒนาอยู่ตลอด แรก ๆ ที่ผมสมัคร LOGIN ไม่ได้ ก็ไม่ได้ค่อยเข้ามา เพราะเข้ามาแล้วไม่เห็น FILE แนบ พอสมัครได้ ผมเลยเข้ามาดูอะไรที่ UPDATE ตลอด ทุกครั้งที่ ONLINE
-
ถูกต้องเลยครับ อ.บอย ผมก็ไปจู่โจมได้คู่มือขั้นตอนการ Set MySQL มาจาก อ.ขวด แล้วมาลองผิดลองถูกลองลงโปรแกรมเปลี่ยนไปเปลี่ยนมา 4 - 5 ครั้ง ตอนนี้คิดว่าพอลงได้แล้วครับ
HOSxP FORUM เป็นอะไรที่ทุกคนเต็มใจให้กันแบบไม่ปิดบังเลย มีการพัฒนาอยู่ตลอด แรก ๆ ที่ผมสมัคร LOGIN ไม่ได้ ก็ไม่ได้ค่อยเข้ามา เพราะเข้ามาแล้วไม่เห็น FILE แนบ พอสมัครได้ ผมเลยเข้ามาดูอะไรที่ UPDATE ตลอด ทุกครั้งที่ ONLINE
ยินดีด้วยนะครับ ที่มี อาจารย์คนเดียวกัน