Error Display : psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? วิธีแก้ปัญหาทีม TSส่งให้ lv2 วิธีแก้ปัญหาทีม SYSNOC หรือ ITSCheck version postgresql - root@sih1 [~]# rpm -qa | grep postgres (returns a list like this:) postgresql-8.4.20-6.el6.x86_64 postgresql-libs-8.4.20-6.el6.x86_64 postgresql-devel-8.4.20-6.el6.x86_64 postgresql-server-8.4.20-6.el6.x86_64 Minimally I had to remove these: rpm -e postgresql-8.4.20-6.el6.x86_64 rpm -e postgresql-libs-8.4.20-6.el6.x86_64 rpm -e postgresql-devel-8.4.20-6.el6.x86_64 rpm -e postgresql-server-8.4.20-6.el6.x86_64 การ remove ด้วยวิธีกดังกล่าวอาจจะต้องเรียงตามลำดับ service ที่ใช้งานซึ่งระบบจะแจ้งให้ทราบเองครับ อ้างอิงจาก : http://www.vpshostingforum.com/remove-postgres-t3022.html
สาเหตุ เกิดจาก ข้อมูลใน table มีปัญหา crash ทำให้ไม่สามารถสร้าง {table name}.TMD ได้ซึ่งอาจจะส่งผลให้การทำงานของ Web มีปัญหาเช่นไม่แสดงเนื้อหาใน Topic วิธีตรวจสอบปัญหา ทำการ Repair DB ผ่าน WHM และสังเกตุข้อความที่ Print ออกมาจะปรากฎข้อความ piyaphan_vb40.searchlog error : Can't create new tempfile: './piyaphan_vb40/searchlog.TMD' status : Operation failed วิธีแก้ปัญหาทีม TSไม่สามารถแก้ไขผ่าน WHM ได้ ให้ติดต่อ level2 วิธีแก้ปัญหาทีม SYSNOC หรือ ITSCommand ที่ใช้ในการแก้ไขบน SSH myisamchk -r -f {tablename}.MYI Example root@trading [/home/mysql/piyaphan_vb40]# myisamchk -r -f searchlog.MYI - recovering (with sort) MyISAM-table 'searchlog.MYI' Data records: 1672690 - Fixing index 1 - Fixing index 2 - Fixing index 3 - Fixing index 4
ใช้ตรวจสอบกรณีที่ดำเนินการ add user ให้กับ data base แล้วแต่ไม่สำเร็จ วิธีแก้ปัญหาทีม TSส่งให้ lv2 ครับ วิธีแก้ปัญหาทีม SYSNOC หรือ ITSใช้ตรวจสอบกรณีที่ดำเนินการ add user ให้กับ data base แล้วแต่ไม่สำเร็จ ก่อนอื่นให้ทดสอบเบื่องต้นดังนี้ - ลบ user ดังกล่าวแล้ว add เข้าไปอีกครั้ง - ลองสร้าง database อื่นแล้ว add อีกครั้ง - ลอง repair database ที่ whm > phpMyadmin - ลอง add user ที่โดเมนอื่นๆในเครื่องเดียวกันอีกครั้ง หากดำเนินการต่างๆแล้วยังไม่สามรถ add user ได้ สามารถตรวจสอบเพิ่มเติมได้ที่ เนื่องจากการ add user ดังกล่าวนั้นกระทำผ่าน cpanel ดังนั้นให้ตรวจสอบ error log ได้ที่ root@vps12 [~]# tail -f /usr/local/cpanel/logs/error_log DBD::mysql::db do failed: You have an error in your SQL syntax; check the manual that corresponds to yourMySQL server version for the right syntax to use near '0E0 TO 'supalerk_noey'@'203.151.232.204'' at line 1 at /usr/local/cpanel/Cpanel/Mysql.pm line 1069. DBD::mysql::db do failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0E0 TO 'supalerk_noey'@'203.151.232.204'' at line 1 at /usr/local/cpanel/Cpanel/Mysql.pm line 1069. แนวทางแก้ไข ให้ทำการ force update cPanel ดังนี้ครับ ไปที่ whm > update preference > เลือก versions ที่จะอัพ จากนั้น ssh ไปที่เครื่องแล้วรัน scrip ดัีงนี้ /scripts/upcp --force หลังจากที่ update แล้วทดลอง add user อีกครั้งและตรวจสอบที่ root@vps12 [~]# tail -f /usr/local/cpanel/logs/error_log หากเจอ error DBD::mysql::db do failed: There is no such grant defined for user 'supalerk_noey' on host '203.151.232.20' at /usr/local/cpanel/Cpanel/Mysql.pm line 1091. DBD::mysql::db do failed: There is no such grant defined for user 'supalerk_noey' on host 'localhost' at /usr/local/cpanel/Cpanel/Mysql.pm line 1091. DBD::mysql::db do failed: There is no such grant defined for user 'supalerk_noey' on host '203.151.232.22' at /usr/local/cpanel/Cpanel/Mysql.pm line 1091. DBD::mysql::db do failed: There is no such grant defined for user 'supalerk_noey' on host '203.151.233.150' at /usr/local/cpanel/Cpanel/Mysql.pm line 1091. เนื่องจากว่ามีการ add ip เหล่านี้ใน cPanel >> ฐานข้อมูล >> Manage Remote MySQL Access ดังนี้
Downgrade MySQL วิธีแก้ปัญหาทีม TS ส่งให้ lv2 ครับ วิธีแก้ปัญหาทีม SYSNOC หรือ ITS Step to Downgrade 1.Remove /var/lib/mysql:rm -Rfv /var/lib/mysqlrm -Rfv /usr/sbin/mysqld 2.Edit /var/cpanel/cpanel.config search and set:mysql-version=4.1 3.Make sure that the skip file isn't there:rm -fv /etc/mysqlupdisable 4.Then install MySQL:/scripts/mysqlup --force 5.Then update the perl module:/scripts/perlinstaller --force Bundle::DBD::mysql 6.Last done:/scripts/upcp --force
วิธีแก้ปัญหาทีม TSวิธี Import/Export MSSQL 1. เปิดโปรแกรม SQL Server Management Studio 2. เลือกที่ database ที่ต้องการ import 3. คลิ๊กขวา แล้วเลือก Tasks จากนั้นไปที่ Export Data... จะเจอหน้าต่าง SQL Server Import and Export Wizard 4. กด Next แล้วจะขึ้น Choose a Data Source แล้วเลือก database ที่ต้องการ export 5. กด Next จะขึ้น Choose a Destination คือ database ปลายทางที่เราต้องการ import เข้าไป หรือจะสร้างขึ้นมาใหม่ก็ได้โดยไปที่ New 6. เลือก Copy data from one or more tables or views แล้ว next 7. เลือก Select All แล้วกด Next 8. จะขึ้น Save and Execute Package ให้กด Next อีกครั้ง แล้วกด Finish วิธีแก้ปัญหาทีม SYSNOC หรือ ITS