MySQL Database problem

Results 1 to 16 of 16
  1. #1
    PW Dev <3 Ozuru is offline
    MemberRank
    Feb 2011 Join Date
    737Posts

    MySQL Database problem

    So guys, ive been working on my own server as you know. This is my second vbox in a week now. The database just deletes. POOF! and its gone. I was just chatting with a friend and we were talking and we were going to go check out the empty templates for a idea. So i logged in pwadmin. Character tab doesn't show up. Nothing does. So, i went to phpmyadmin. As of now, my database doesn't even EXIST. This is horrible QQ. This is the 2nd time in one week it just deleted.

    Any ideas?


  2. #2
    Black Magic Development das7002 is offline
    MemberRank
    Apr 2010 Join Date
    EarthLocation
    2,188Posts

    Re: MySQL Database problem

    Doubtful... It more then likely is there and you just don't see it (or logged in as a user that doesn't have privileges to see it)

  3. #3
    Apprentice 32prcljr32 is offline
    MemberRank
    Sep 2010 Join Date
    22Posts

    Re: MySQL Database problem

    I had the same problem when I edited my localhost in config.php

    /*-------Config MySQL Database-------*/

    $DB_Host = "localhost"; // localhost or your IP
    $DB_User = "root"; // Database user
    $DB_Password = "root"; // Database password
    $DB_Name = "dbo"; // Database name

    check all ips are correct and also check the password
    in my case I found a wrong ip and replacing the problem disappeared
    (I'm using the server's post 343 thus may be different in your case)

  4. #4
    Angelemu founder tbnanubis is offline
    MemberRank
    Mar 2011 Join Date
    Unicorn ForestLocation
    527Posts

    Re: MySQL Database problem

    change all passwords and try again, maybe just someone hacked your server because you used standard passwords or easy guessable. I strongly suggest using lower AND uppercase letters AND numbers for your mysql accounts (even for the username).

  5. #5
    Omega 343 is offline
    MemberRank
    Oct 2009 Join Date
    Ancient DGN CTYLocation
    5,514Posts

    Re: MySQL Database problem

    Quote Originally Posted by tbnanubis View Post
    change all passwords and try again, maybe just someone hacked your server because you used standard passwords or easy guessable. I strongly suggest using lower AND uppercase letters AND numbers for your mysql accounts (even for the username).
    Not even necessary, just make sure you don't open 3306 to the WAN ;)

  6. #6
    PW Dev <3 Ozuru is offline
    MemberRank
    Feb 2011 Join Date
    737Posts

    Re: MySQL Database problem

    So guys i wanna say thanks. I will try this out. I forgot to say i am using softsoldiers release. When i log into phpmyadmin as root, it puts something on the link. Like MYIPHERE/Index.phpi=t45hsfnsji678jbgyeklopqs63

    Doesnt that mean there is a session? Also - where would my database folder be, because i want to see if das is right. I know it varies, but give me possible locations.
    Last edited by Ozuru; 04-04-11 at 06:04 PM.

  7. #7
    PW Dev <3 Ozuru is offline
    MemberRank
    Feb 2011 Join Date
    737Posts

    Re: MySQL Database problem

    Even if i can't host a server live, i could develop and contribute to the community and help others. Thanks for your help ^^



    -EDIT-

    343 - could i just do ufw deny 3306?
    Last edited by Ozuru; 04-04-11 at 06:05 PM.

  8. #8
    Apprentice davies142 is offline
    MemberRank
    Jun 2009 Join Date
    Budapest, HUNLocation
    23Posts

    ! Re: MySQL Database problem

    So guys, first If you have a fresh installed mySQL server, you have more than one privileges for root.

    You should go to phpmyadmin->privilege section.
    You can see all users and their permissions.

    I suggest you:
    First, change the root's password on localhost.
    (BTW If you have a production-level server, and you wanna manage it remotely, you have to choose '%' domain which accept the authentication from any address)

    Second, delete all users except root for localhost or '%'.

    Third, You should check all tuning parameters, because misconfigured mysql database can eat you memory, and will loose files integrity and it may can crash your application.

    Fourth, use myIsam instead of InnoDB because it easy to reapir and backup, coz myisam is filesystem oriented database.

    Speed doesnt matter right now, you game have own database to save any items.


    P.S:
    Backup backup backup.
    Last edited by davies142; 04-04-11 at 06:51 PM.

  9. #9
    PW Dev <3 Ozuru is offline
    MemberRank
    Feb 2011 Join Date
    737Posts

    Re: MySQL Database problem

    Actually, i thought I may have ran out of memory. In my pwAdmin, i can only access the add-ons. For most of them it says it can't locate a file, (I never had that problem before until the database crashed...) and the other one says not enough memory. Maybe i should make a new vbox with alot of memory?

    By the way - I cant even get into the phpmyadmin section, doesnt even let me in if im in root.
    Last edited by Ozuru; 04-04-11 at 06:54 PM.

  10. #10
    Apprentice davies142 is offline
    MemberRank
    Jun 2009 Join Date
    Budapest, HUNLocation
    23Posts

    Re: MySQL Database problem

    I think you have to use more swap.
    I dont think so, that is an SQL problem.

  11. #11
    Black Magic Development das7002 is offline
    MemberRank
    Apr 2010 Join Date
    EarthLocation
    2,188Posts

    Re: MySQL Database problem

    Quote Originally Posted by davies142 View Post
    So guys, first If you have a fresh installed mySQL server, you have more than one privileges for root.

    You should go to phpmyadmin->privilege section.
    You can see all users and their permissions.

    I suggest you:
    First, change the root's password on localhost.
    (BTW If you have a production-level server, and you wanna manage it remotely, you have to choose '%' domain which accept the authentication from any address)

    Second, delete all users except root for localhost or '%'.

    Third, You should check all tuning parameters, because misconfigured mysql database can eat you memory, and will loose files integrity and it may can crash your application.

    Fourth, use myIsam instead of InnoDB because it easy to reapir and backup, coz myisam is filesystem oriented database.

    Speed doesnt matter right now, you game have own database to save any items.


    P.S:
    Backup backup backup.
    No, no, no, no, no.

    MySQL is an unencrypted protocol, if you are going to use it remotely you should use something such as phpMyAdmin (over SSL) or SSH+MySQL

  12. #12
    Apprentice davies142 is offline
    MemberRank
    Jun 2009 Join Date
    Budapest, HUNLocation
    23Posts

    Re: MySQL Database problem

    HTTP also unencrypted protocol wihtout SSL, and many people sends their passwords through non-ssl http.

    BTW, encryption isnt bad advice, but If you have a some experience in crypto, you can make an easy tool which can capture any crypted data as unencrypted, like SSL, TLS.

    Anyway dont sitting a sniffer kiddie under every server.

  13. #13
    PW Dev <3 Ozuru is offline
    MemberRank
    Feb 2011 Join Date
    737Posts

    Re: MySQL Database problem

    Okay guys, update. I am testing adding more memory and RAM. The first vbox i used ran for about 2-3 weeks live then crashed. The second one crashed after about 2 days. Also, crash as in i cant find database. I know its deleted because gameserver cant find the tables. Thank god it didnt have many players yet... Now, my second vbox crashed after...2 days?

    Also - is there a automatic backup program for ubuntu? This whole ordeal has taught me to make many backups for anything and everything. As das's sig says, you dont know if it blows up on you or your work...
    Posted via Mobile Device

  14. #14
    Black Magic Development das7002 is offline
    MemberRank
    Apr 2010 Join Date
    EarthLocation
    2,188Posts

    Re: MySQL Database problem

    Quote Originally Posted by M a g i c View Post
    Okay guys, update. I am testing adding more memory and RAM. The first vbox i used ran for about 2-3 weeks live then crashed. The second one crashed after about 2 days. Also, crash as in i cant find database. I know its deleted because gameserver cant find the tables. Thank god it didnt have many players yet... Now, my second vbox crashed after...2 days?

    Also - is there a automatic backup program for ubuntu? This whole ordeal has taught me to make many backups for anything and everything. As das's sig says, you dont know if it blows up on you or your work...
    Posted via Mobile Device
    Take lots of snapshots, thats what makes virtual machines so damn amazing (and why I love EC2 so much as well)

  15. #15
    PW Dev <3 Ozuru is offline
    MemberRank
    Feb 2011 Join Date
    737Posts

    Re: MySQL Database problem

    Snapshots? I'm not really aware of them, I will dig and search for it though. Thanks ^_^


    -EDIT-
    Duhhhhhhhh I found the snapshots, i am not as stupid as you think mk...
    Last edited by Ozuru; 04-04-11 at 11:56 PM.

  16. #16
    PW Dev <3 Ozuru is offline
    MemberRank
    Feb 2011 Join Date
    737Posts

    Re: MySQL Database problem

    Alright, servers been up for one day, and i got a question. Could you list all the files i change to 127.0.0.1? I heard it was all but one to localize pwadmin... Atm i have myself blocked out, so what i do is open that port, get in do what i need to do and then re block the port. Hey, it works :P
    Posted via Mobile Device



Advertisement