PC SupportQuick SQL issue, perhaps somebody could help?
Posted:
PC SupportQuick SQL issue, perhaps somebody could help?Posted:
Status: Offline
Joined: Feb 13, 20186Year Member
Posts: 330
Reputation Power: 272
Status: Offline
Joined: Feb 13, 20186Year Member
Posts: 330
Reputation Power: 272
Hey guys! So, I'm working on a FiveM server and whenever I import this SQL I get this error:
gyazo.com/b5376ea72bd931e6f6ca41ac057e7542 - The database is hosted off a Linux VPS. However, when I run the SQL on my test server which uses XAMPP on my local host it goes through without issues. It's causing a lot of hassle not sure on how to go about fixing it. Any help would be truly, truly appreciated. |
#2. Posted:
Status: Offline
Joined: Jan 16, 201212Year Member
Posts: 20,271
Reputation Power: 17066
Motto: 2b || !2b
Motto: 2b || !2b
Status: Offline
Joined: Jan 16, 201212Year Member
Posts: 20,271
Reputation Power: 17066
Motto: 2b || !2b
Looks to me like the transactions field is looking for text but has the default of 0 which isn't usually possible on default setups, if you require the default of 0 in that field you could disable Strict mode which should then allow the default to be set regardless. |
- 2useful
- 0not useful
#3. Posted:
Status: Offline
Joined: Feb 13, 20186Year Member
Posts: 330
Reputation Power: 272
Status: Offline
Joined: Feb 13, 20186Year Member
Posts: 330
Reputation Power: 272
Craig wrote Looks to me like the transactions field is looking for text but has the default of 0 which isn't usually possible on default setups, if you require the default of 0 in that field you could disable Strict mode which should then allow the default to be set regardless. How would I go about that? I'm a noob in terms of this stuff, but slowly learning. |
- 0useful
- 0not useful
#4. Posted:
Status: Offline
Joined: Jan 16, 201212Year Member
Posts: 20,271
Reputation Power: 17066
Motto: 2b || !2b
Motto: 2b || !2b
Status: Offline
Joined: Jan 16, 201212Year Member
Posts: 20,271
Reputation Power: 17066
Motto: 2b || !2b
Depends on if you need the default value for transactions?
If not, you could just try amending that line to `transactions` text NULL, If you want to disable strict mode: stackoverflow.com/a/45612889 |
- 1useful
- 0not useful
#5. Posted:
Status: Offline
Joined: Feb 13, 20186Year Member
Posts: 330
Reputation Power: 272
Status: Offline
Joined: Feb 13, 20186Year Member
Posts: 330
Reputation Power: 272
Craig wrote Depends on if you need the default value for transactions? Hey dude, sorry to bother you again. Could you shed some light on another line for me please? I'm trying to create a user with all privileges to access the database remotely (I.E. On my desktop) however I keep getting a syntax error. I've googled it and still non the wiser. Code is: GRANT ALL ON *.* TO 'username'@'mylocalIP' IDENTIFIED BY 'mypassword'; |
- 0useful
- 0not useful
#6. Posted:
Status: Offline
Joined: Jan 16, 201212Year Member
Posts: 20,271
Reputation Power: 17066
Motto: 2b || !2b
Motto: 2b || !2b
Status: Offline
Joined: Jan 16, 201212Year Member
Posts: 20,271
Reputation Power: 17066
Motto: 2b || !2b
Try this.
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'newpass';
GRANT ALL ON *.* TO 'newuser'@'localhost';
Be sure that the port is remotely accessible, usually 3306. |
- 1useful
- 0not useful
#7. Posted:
Status: Offline
Joined: Feb 13, 20186Year Member
Posts: 330
Reputation Power: 272
Status: Offline
Joined: Feb 13, 20186Year Member
Posts: 330
Reputation Power: 272
Craig wrote Try this. Returns the error "You are not allowed to create a user with GRANT" despite me being logged in using the root account. |
- 0useful
- 0not useful
#8. Posted:
Status: Offline
Joined: Aug 13, 20159Year Member
Posts: 227
Reputation Power: 20
You can not have a default value |
- 0useful
- 0not useful
#9. Posted:
Status: Offline
Joined: Feb 13, 20186Year Member
Posts: 330
Reputation Power: 272
Status: Offline
Joined: Feb 13, 20186Year Member
Posts: 330
Reputation Power: 272
Never mind, I'm a complete bot. Thank you so much Craig! I truly, truly appreciate the help! |
- 0useful
- 0not useful
#10. Posted:
Status: Offline
Joined: Jan 16, 201212Year Member
Posts: 20,271
Reputation Power: 17066
Motto: 2b || !2b
Motto: 2b || !2b
Status: Offline
Joined: Jan 16, 201212Year Member
Posts: 20,271
Reputation Power: 17066
Motto: 2b || !2b
- 1useful
- 0not useful
Users browsing this topic: None