Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6
  1. #1
    Senior Member
    Join Date
    Mar 2002
    Location
    Alabama sans the damn flag
    Posts
    263
    Member #
    38
    Hello all, long time no been around.

    We had a recently not-so-dearly departed co-worker who did some stuff in MySQL ... against orders. Passworded.

    We managed (thumbscrews were used, I understand) to get the password. But now, I find that I haven't the vaguest idea how to get into the MySQL program to see, export or otherwise muck around with the data.

    I have a username and a password. How do I proceed from here?
    DerFarm
    I talk to squirrels.
    Squirrels Answer.

  2.  

  3. #2
    Senior Member rosland's Avatar
    Join Date
    Jul 2003
    Location
    Norway
    Posts
    1,944
    Member #
    2096
    You can use phpMyAdmin, MySQL ControlCenter or any other GUI to gain access to the MySQL data.

    If you use the bare bone MySQL monitor (in windows you start it from "start->run->"write CMD" and enter. In Linux/Unix it's the root shell window. Change catalog in windows until it shows C:\>mysql\bin (default place, if its installed somewhere else, then write the appropriate path.

    Type:
    mysql -u username -p and hit enter.
    enter the password, and hit enter.
    You should now be met by a small welcome text followed by the command prompt.

    If you write:
    show databases; and hit enter, it will give you a list of all databases.

    use databasename; and enter, it will give you access to chosen database.

    show tables; and enter, lists all tables in that database.

    select * from tablename; will show all content of selected table.

    After that you can DROP, DELETE FROM, UPDATE, INSERT, CREATE and so forth to your hearts desire, to make all changes you want.

    If you want to create a new superuser with grant permissions, and delete the old one (the culprits account), you have to select the database "mysql" and go to table "user".

    Write:
    grant all privileges on *.* to yourname@localhost identified by "some_password" with grant option; That will give you full access to all databases and tables on that MySQL server. I think you can exchange the "localhost" with %, to give you access to the databases from any remote machine, when logging on with that user/password combination.

    To delete the banned user, type:
    delete from user where User='culprit_user_name';

    Best of luck

    EDIT:
    The grant query will only work if the user/password combination you initially log on with, has full GRANT privileges.
    S. Rosland

  4. #3
    Senior Member
    Join Date
    Mar 2002
    Location
    Alabama sans the damn flag
    Posts
    263
    Member #
    38
    UMMMMMM.....not quite.

    I'm able to follow your instructions, but, I don't know how to get into MySQL to start with.

    I'm running XP, with the mysql structure being:
    c:\mysql\ and a bunch of folders off that. among those are bin, and others.

    where is the program to open MySQL??? I found the admin program, but it doesn't appear to be what I can use.

    There is not a windows icon (that I can see).

    Alternatively, can I connect to the data tables from Access? or vb code?
    DerFarm
    I talk to squirrels.
    Squirrels Answer.

  5. #4
    Senior Member
    Join Date
    Mar 2002
    Location
    Alabama sans the damn flag
    Posts
    263
    Member #
    38
    'S All right. I figured out how to start it (silly me, of course, command line processing)

    the bad news is that the data is all CRAP!!!

    the good news is that WE DON'T CARE!!!!


    Thank you Rosland, it was a great help.
    DerFarm
    I talk to squirrels.
    Squirrels Answer.

  6. #5
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    MySQL is not exactly user-friendly compared to Access, MS SQL, etc, as you no doubt have found out. Unless you have PHP installed and can use phpMyAdmin, there isn't else much better to use unless you know queries like the back of your hand.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  7. #6
    Senior Member rosland's Avatar
    Join Date
    Jul 2003
    Location
    Norway
    Posts
    1,944
    Member #
    2096
    You're most welcome! :classic:

    I think there are GUI's out there that are compiled from C and other low-level languages that communicates directly with MySQL (without the use of a script interpreter like PHP to work).

    phpMyAdmin (which is php based) is fairly powerful, but requires a php parser to work. MySQLCC, is php independant (as far as I know), has a more "windows-like" feel to it, but gives you less control than phpMyAdmin. Both of these are GNU releases.

    If you move up to commercial applications, you get quite powerful tools to interact with the DB server. I've tried one of them (30 day trial), and it's quite impressive. MySQL AB is going to release a new GUI called "MySQL Administrator" soon, and hopefully that will support the more advanced functions added to MySQL recently. (I think that it's going to be released under GNU as well.)
    S. Rosland


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 03:32 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com