BMS-HOSxP Community

HOSxP => แจ้งปัญหา / ขอความช่วยเหลือ => ข้อความที่เริ่มโดย: ploykot ที่ ธันวาคม 11, 2012, 18:45:24 PM

หัวข้อ: ขอความรู้เกี่ยวกับ sql
เริ่มหัวข้อโดย: ploykot ที่ ธันวาคม 11, 2012, 18:45:24 PM
เชค user password dbname จาก cent os ได้อย่างไรครับ พอดี ถ่ายโอนข้อมูลจาก master ไป slave ไม่ได้คับฐานข้อมูลไม่ตรงกันครับ
หัวข้อ: Re: ขอความรู้เกี่ยวกับ sql
เริ่มหัวข้อโดย: pop_hosxp ที่ ธันวาคม 11, 2012, 18:56:11 PM
grant สิทธิ์ใหม่ครับ แล้วจดไว้ในที่ลับสุดยอด ;D
หัวข้อ: Re: ขอความรู้เกี่ยวกับ sql
เริ่มหัวข้อโดย: เกื้อกูล ครับ.. ที่ ธันวาคม 11, 2012, 19:28:48 PM
grant สิทธิ์ใหม่ครับ แล้วจดไว้ในที่ลับสุดยอด ;D


จดไว้กับ Sim  มือถือ...OR  MicroSD Card ครับ..ที่มี   ;D ;D
หัวข้อ: Re: ขอความรู้เกี่ยวกับ sql
เริ่มหัวข้อโดย: ploykot ที่ ธันวาคม 11, 2012, 21:53:29 PM
ขอคำสั่ง grant สิทธิ์ ครับ มัน eror ดังภาพครับ
หัวข้อ: Re: ขอความรู้เกี่ยวกับ sql
เริ่มหัวข้อโดย: pop_hosxp ที่ ธันวาคม 11, 2012, 22:05:49 PM
grant all on *.* to sa@'%' identified by 'sa' with grant option;
grant all privileges on  *.* to sa@'%' identified by 'sa' with grant option;
flush previleges;

เปลี่ยน sa เป็น user และ password ที่ต้องการด้วยนะครับ
หัวข้อ: Re: ขอความรู้เกี่ยวกับ sql
เริ่มหัวข้อโดย: ploykot ที่ ธันวาคม 11, 2012, 22:16:26 PM
grant all on *.* to user@'%' identified by 'user' with grant option;
grant all privileges on  *.* to password@'%' identified by 'password' with grant option;
flush previleges;
แก้ตามนี้ถูกไหมครับ แก้ใน teminal หรือ แก้ที่ใดครับ อาจารย์
หัวข้อ: Re: ขอความรู้เกี่ยวกับ sql
เริ่มหัวข้อโดย: pop_hosxp ที่ ธันวาคม 12, 2012, 07:01:33 AM
1. sa อันแรกเป็น user ส่วน sa อันที่สองเป็น password (หลัง identified by)
2. ใช้คำสั่งใน terminal โดยต้องเข้าใช้คำสั่งเหล่านี้ผ่านโปรแกรม mysql
หัวข้อ: Re: ขอความรู้เกี่ยวกับ sql
เริ่มหัวข้อโดย: chitvichai ที่ ธันวาคม 12, 2012, 08:16:20 AM
grant all on *.* to user@'hostname or ip or %' identified by 'password' with grant option;
grant all privileges on  *.* to user@'hostname or ip or %' identified by 'password' with grant option;
flush previleges;
แก้ตามนี้ครับ

hostname or ip or % เป็นของเครื่องลูกข่ายที่อนุญาต นะครับ
เช่นให้ เครื่อง ip 192.168.0.1-192.168.0.254 ใช้ก็

grant all on *.* to user@'192.168.0.%' identified by 'password' with grant option;
grant all privileges on  *.* to user@'192.168.0.%' identified by 'password' with grant option;
flush previleges;

ถ้า % อย่างเดียวหมายถึงให้ทุกเครื่องที่เข้าถึงได้จากเครือข่ายทั้งภายในและภายนอก