Jump to content
  • 0

Solved] My Linux mySQL Issues


Matrixfox

Question


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  277
  • Reputation:   76
  • Joined:  11/23/11
  • Last Seen:  

I followed the install guide on the ra wiki site word for word, however I'm having some issues getting my server to connect to itself.

After I run "./athena-start start" It reads this following error in term and ssh.

http://s878.photobuc...nt=myraserv.png

P.S. This is my second linux server, third server if you count that crappy windows 2008 r2 one. I need some guidance on rathena w/ mysql on linux, please~

The ip being blurd is one of my vps ip's. *lets just call it 69.69.69.69*

I tried switching it to my second ip 69.69.69.70, but same error.

-thank you all <3

Edited by matrixfox
Link to comment
Share on other sites

14 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

seem like your mysql server doesn't allow host. Is it remote host or local ?

I mean does your eathena server is on same host as mysql server ?

I think the configuration error is there.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  277
  • Reputation:   76
  • Joined:  11/23/11
  • Last Seen:  

Yeah, I'm trying to setup a mysql database and rathena running on the same linux vps.

PS. I'm so confused... So I need two vps servers?

---

I just reformated my vps and just installed vnc. I would really like to run my mysql and rathena server off my linux vps, sigh...

http://s878.photobucket.com/albums/ab343/matrixfox/?action=view&current=mylinuxbox.png

Edited by matrixfox
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  36
  • Reputation:   1
  • Joined:  01/07/12
  • Last Seen:  

you can, you just need a local, and public mysql access I have one for both i primarily use the public one

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

no it's fine you can have both on same host, it's easier in fact.

I just tough from the message that it wasn't the case (since you blank them)

Trough console and by this user do you manage to get connected ?

e.g: mysql -u myuser --password=mypass mydbname

myuser, mypass, mydbname, are the one you set on inter_athena.conf. and since we don't specify host it's on local.

If you're mysql it's ok and you missed something on rA. you kept 127.0.0.1 for mysql ip right ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  277
  • Reputation:   76
  • Joined:  11/23/11
  • Last Seen:  

Yeah, of course I keeped my mysql set to localhost. I know just to change the ra conf files to connect.

I used every command on that wiki site to install. That was the reason why I blurd it and gave a default ip.

MySQL isn't okay, I know how to edit everything in ra, so yeah I'm not a complete noob.

I'm a bit confused about this. So I'm going try to use English...

-=-=-=-=-

mysql --user=root -p //this made my MySQL root account w/ a password.

CREATE USER 'rathena4444'@'localhost' IDENTIFIED BY 'secretpassword'; = //this part made my info I need to change in "inter_athena"

CREATE DATABASE rathena4444_rag; //this made my database which I loaded my sql-files in, also need to change in "inter_athena".

Yes, after creating the database I did grants.

Also I have no idea how to change the s1/p1 with out some sort of control panel lol...

I changed map,char,inter,and subnet to one of my vps ip's.

./athena-start start //gives me that first error/picture

-=-=-=-=-

@master I have no idea what you're really talking about, give me a second. I thought mysql worked magically after installing.

I really appreciate the help from the both of you!!

Edited by matrixfox
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  633
  • Reputation:   78
  • Joined:  11/14/11
  • Last Seen:  

If you want to change the S1 and P1 in your mysql database:

  1. Login first to your mysql as root account
  2. then type USE YOURDATABASENAME;
  3. then type SELECT * FROM `login` where account_id='1';
  4. then the S1 and P1 should appear as result
  5. then if you want to change it type UPDATE `login` SET userid='desiredusername', user_pass='desiredpassword' WHERE account_id='1';
  6. If successful change also the username and password of your map, login and char.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

Ok matrixfox sorry if my question seem looking down.

Juging from your scenario you didn't confirm user rathena4444 could connect, yest you did all setup but I don't see where you try to connect with yet (that what I was asking).

You can try it and change username like JayPee said :

mysql -u rathena4444 --password=secretpassword rathena4444_rag #connect to mysql from the user will use to our ragnarok db

UPDATE `login` SET userid='desiredusername', user_pass='desiredpassword' WHERE account_id='1'; #change s1/p1

or maybe

INSERT INTO`login` ( userid, user_pass, sex ) VALUES ("user", "pass", "S") #add new user user

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  277
  • Reputation:   76
  • Joined:  11/23/11
  • Last Seen:  

Far out man, thank you for holding my hand. I guess I should get a MySQL book or that document.

Not having workstation sucks!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  392
  • Reputation:   285
  • Joined:  12/19/11
  • Last Seen:  

MySQL users are 'name'@'host' where host is hostname or IP that is allowed to connect with username name.

You've create a user @localhost, ie. @127.0.0.1, but to MySQL server rAthena appears to be connecting from your external IP instead. You should add another user 'username'@'<external IP here>' just like you've added the first one. If you set the same password as for the @localhost user, you even won't have to change rAthena configuration.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  277
  • Reputation:   76
  • Joined:  11/23/11
  • Last Seen:  

Ohh, let me give this another try. I just got a disk quota exceeded error lol... I just formatted my container and didn't install gnome w/ vnc.

Bummer, I tried doing all that. I just keeped getting more errors... Nothing is working, I tried doing so much. I just don't understand what I'm doing wrong...

http://s878.photobuc...ent=bwabewa.png

Maybe its my vps? idk...

I'm a bit confused, hopelessly. The ip x.x.x.x was changed to my wan ip didn't work. I tried changing it to one of my vps ip's didn't either.

As for s1/p1, It's set like this for simple learning atm.

UPDATE `login` SET userid='rathena4444', user_pass='secretpassword' WHERE account_id='1';

CREATE USER 'rathena4444'@'x.x.x.x' IDENTIFIED BY 'secretpassword';

Then did grats after creating. Do I need a localhost or my vps ip here, arg or both...?

My inter_athena.conf looks like this

// Global SQL settings
// overriden by local settings when the hostname is defined there
// (currently only the login-server reads/obeys these settings)
sql.db_hostname: x.x.x.x
sql.db_port: 3306
sql.db_username: rathena4444
sql.db_password: secretpassword
sql.db_database: rathena4444_rag
sql.codepage:
// MySQL Character SQL server
char_server_ip: x.x.x.x
char_server_port: 3306
char_server_id: rathena4444
char_server_pw: secretpassword
char_server_db: rathena4444_rag
// MySQL Map SQL Server
map_server_ip: x.x.x.x
map_server_port: 3306
map_server_id: rathena4444
map_server_pw: secretpassword
map_server_db: rathena4444_rag
// MySQL Log SQL Database
log_db_ip: x.x.x.x
log_db_port: 3306
log_db_id: rathena4444
log_db_pw: secretpassword
log_db_db: rathena4444_log
log_codepage:
log_login_db: loginlog

as for login_ip, char_ip ,map_ip located in the other two config files. map_athena.conf, char_anthena.conf ip's are being changed too.

Edited by matrixfox
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  392
  • Reputation:   285
  • Joined:  12/19/11
  • Last Seen:  

Well at least you're having another error message now.

Looks like SQL grants for the user are not sufficient. Remember that you have to add grants to 'user'@'x.x.x.x' not 'user'@'localhost'.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  277
  • Reputation:   76
  • Joined:  11/23/11
  • Last Seen:  

Omg thank you all billion and one!!!

Gepard, I absolutely love your avatar! Thank you especially!!! Now I kinda get a grasp. Linux is easier once you get the hang of it.

Now I gotta research on how to make accounts with mysql commands xD

INSERT INTO`login` ( userid, user_pass, sex ) VALUES ("user", "pass", "S") #add new user user

I tried what you said, didn't quite work. I must be a noob and doing something wrong. So I googled for more help. I found this http://trac.opensvn....allInstructions

But I'm still having issues with that lol...

This is the error I recive. *googles for manual*

mysql> INSERT INTO `login`
-> (`matrixfox`,`balls`,`M`,`[email protected]`,`1`)
-> VALUES ('<matrixfox>','<balls>','<M>','<[email protected]>',<1>);	  ERROR 1064 (42000): 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 '<1>)' at line 3

Also found another guide on adding accounts... I'm still noobing out man...

INSERT INTO login (account_id, userid, user_pass, sex, email, level) VALUES (704561, 'myname', 'mypass', 'F', 'me@localhost', 99);

ERROR 1054 (42S22): Unknown column 'level' in 'field list'

OHHHHHHH!!!!! group_id not level... lolol

Edited by matrixfox
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

INSERT INTO `login` (userid,user_pass,sex,email,group_id) VALUES ('matrixfox','balls','M','[email protected]',1);

fixed, () is to specify wich row we want to fill in value and in wich order.

This is an exemple to add a new ig account not mysql user btw

Edited by Lighta
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  277
  • Reputation:   76
  • Joined:  11/23/11
  • Last Seen:  

Ohh, I think I'm learning lol. I still would like to get something on mysql/rathena to learn more

Thank you all, e-cookies for all!!!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...