SitePoint Sponsor

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 25 of 41

Thread: MySQL errors

  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2002
    Location
    Nevada USA
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MySQL errors

    Hi:

    I'm a newbie to MySQL. Just installed it today and it was setup remotely by my host admin. I've been through the tutorials and documentation from several different sources and can't seem to figure out this problem. I've successfully created a table, did a describe table to check that all feilds are properly named and given the correct data type. I then tried to populate the table using a tab delimited file with the command
    load data local infile "path\filename" into table "tablename" as outlined in the tutorial and received a the following error.
    Error 1045: access denied for user: 'my_user_name.....
    (Using password: yes)

    Are their pemissions I must set?
    I saw that I could use comman delimited field data, but does it need to be in quotes?
    If I use the \n to indicate a null feild value, what do I use to indictae the end of a record?
    Do you know of any addidtional resouces or forums for answers to problems like these?

    Thanks in advance! Any input would be appreciated.

    ThatLouGuy
    Thatlouguy says "This is a dark ride"

  2. #2
    Apache Expert i_like_php's Avatar
    Join Date
    Nov 2001
    Location
    Dallas, Texas
    Posts
    1,342
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try removing the password and that should help if not talk to your host admin.
    i love php

  3. #3
    SitePoint Enthusiast
    Join Date
    Feb 2002
    Location
    Nevada USA
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the advice. Unfortunately, I did not understand what you meant about removing the password. I think my problem is in the permissions and I need to set up an .ini file but have not idea how to structure it. Your advice is always welcome!
    Thatlouguy says "This is a dark ride"

  4. #4
    Apache Expert i_like_php's Avatar
    Join Date
    Nov 2001
    Location
    Dallas, Texas
    Posts
    1,342
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Wink

    my fault i should have been more clear. what i meant by removing the password, did you install the mysql server yourself or did someone else do it?? if you have mysql on a windows computer first go to the directory to which mysql was installed in, it should be C:. ok find the mysql folder, then click on bin and look for a program called "winmysqladmin". click on that and you should see a my.ini setup. if you see this
    then it should look like the example below, look until you see the password once you see that just clear the password like the example below. hope this helps if not the problem solving masters will step in help you out...

    #This File was made using the WinMySQLAdmin 1.3 Tool
    #12/26/2001 11:07:36 AM

    #Uncomment or Add only the keys that you know how works.
    #Read the MySQL Manual for instructions

    [mysqld]
    basedir=C:/mysql
    #bind-address=
    datadir=C:/mysql/data
    #language=C:/mysql/share/your language directory
    #slow query log#=
    #tmpdir#=
    port=3306
    #set-variable=key_buffer=16M
    [WinMySQLadmin]
    Server=C:/mysql/bin/mysqld-nt.exe
    user=whatever
    password=
    QueryInterval=1
    i love php

  5. #5
    SitePoint Enthusiast
    Join Date
    Feb 2002
    Location
    Nevada USA
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi

    Thanks for taking the time to explain that. I thought I had read thru all the install instructs but I don't recall ever reading about winmysqladmin.exe or having to run the my.ini creation. Anyway, I did as you instructed but I'm still getting a
    Error 1045: access denied for user: my_user_name.....
    (Using password: yes) when I try to populate my table.

    I have experience with databases but not SQL. I installed MySQL under windows myself. I wanted to add a database to my web site and start learning php. I thought that the host admin would get this ready to go but I really didn't know what to expect. I read about setting permissions in the ini file for read write access to the tables and columns but I can't figure out how to set them. Did you need to do that before adding data to your table(s) also?

    Thanks again
    Last edited by thatlouguy; Mar 1, 2002 at 00:25.
    Thatlouguy says "This is a dark ride"

  6. #6
    Apache Expert i_like_php's Avatar
    Join Date
    Nov 2001
    Location
    Dallas, Texas
    Posts
    1,342
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmmm under which windows system 98,2000, or me??? i got the error once and removed the password and never got it since.
    i love php

  7. #7
    SitePoint Enthusiast
    Join Date
    Feb 2002
    Location
    Nevada USA
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi

    Windows 98. My machine runs so well and is so stable that I can't bring myself to upgrade the O/S. It's also an older machine (first generation pentium) but it does all that I ask of it and never boggs down.
    Loyalty runs in my family.
    I have my host admin looking into the problem as well but no one seem to know what causing it. Maybe it's because my ini had more commented commands than your's showed? Maybe it's the way my local txt file that I'm trying to populate the table with is structured? I'll play with that today. I never did try to enter the data one record at a time. We'll see what we can uncover.

    Thanks for getting back to me
    Thatlouguy says "This is a dark ride"

  8. #8
    Apache Expert i_like_php's Avatar
    Join Date
    Nov 2001
    Location
    Dallas, Texas
    Posts
    1,342
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmmm what computer system are you on, maybe that could be the problem. i don't think that overpopulating the table, would give you give you an access denied error. can you the code of your table...
    i love php

  9. #9
    SitePoint Enthusiast
    Join Date
    Feb 2002
    Location
    Nevada USA
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi I_like_php

    MySQL can be run on machines as old as 386s so I don't think that my problem stems from my machine. If I assume you are not running your own server and access to MySQL is provided to you thru a host, do you happen to know what adminisrative control you have? I think my host believes that I can change and grant access but I can't find any info anywhere that allows anyone without direct access to the server to do that. I also didn't understand the last sentence of your reply "can you the code of your table..."
    Thatlouguy says "This is a dark ride"

  10. #10
    Apache Expert i_like_php's Avatar
    Join Date
    Nov 2001
    Location
    Dallas, Texas
    Posts
    1,342
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i am running mysql on my own computer, so i control everything... you said this in your earlier response

    "Maybe it's the way my local txt file that I'm trying to populate the table with is structured? "
    thats the code i wanted to see. do you have phpmyadmin, if not then it's a must that you get it, because it will do alot for you. heres the link...http://phpmyadmin.sourceforge.net/ once you have that all setup, then click on users and adjust yoru settings accordingly. hope this helps...
    i love php

  11. #11
    SitePoint Enthusiast
    Join Date
    Feb 2002
    Location
    Nevada USA
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi I_like_php:

    I've pretty much eliminated the way txt file is structured as being the cause of the error. I've tried every concievable way to set up the file with the same results. I've even set up the same database and table that I have on the server on my machine. The strange thing is that I get an error message saying that the LOAD DATA LOCAL INFILE command is not supported by this version. I'm running MySQL version 3.23.49. I've attempted to find and test a different version of MySQL but havn't been sure if the one I DLoaded is correct (binary vs. source).
    I feel like I'm going in circles.
    Thanks for the link to phpMyAdmin. Though I'm not sure if that would help. Am I wrong in assuming that (or would you know if) all admin control (granting privilages)is done by a host? MySQL is on your own machine. Does that mean you have your own server? How are you connected to the web? Just curious
    I've been entering records one at a time just so I have some data to work with so I could begin writing php code to interface with the DB. At least I can start moving ahead with learning php until I can get this access problem resolved. Do you have any good php tutorial sites (I'm using ZorKa and W3S as a start).

    Thanks for all your feedback. You've been more help than you realize. Your an
    Last edited by thatlouguy; Mar 2, 2002 at 16:31.
    Thatlouguy says "This is a dark ride"

  12. #12
    Apache Expert i_like_php's Avatar
    Join Date
    Nov 2001
    Location
    Dallas, Texas
    Posts
    1,342
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmm you can download mysql to your computer from www.mysql.com and agree to the terms, then the use is free.. hmmm control can be set by your host sad to say.. i'm just using mysql on my machine for testing purposes
    i love php

  13. #13
    SitePoint Enthusiast
    Join Date
    Feb 2002
    Location
    Nevada USA
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I_like_php

    You would not believe the amazing things that can happen when you have ABSOLUTLY NO IDEA WHAT YOUR DOING. I'm the perfect example.

    I got this bright idea last week to add a database to my website. I've programmed in DXBL and DBF some Access and figured no biggie.

    I had wondered about the interface (how I would load data and run queerys) but did think anything of it.

    I ordered it from my host and when they sent my logon info they said to DL the MYSQL program (monitor) from the MYSQL website. So I did. I read the manual (99% I didn't understand) and jumped in with both feet. Now I'm up to my butt in questions with no answers.

    Anyway, I did as you suggested and got the phpMYadmin, figuring it was an easier way to interface with the MySQL database. I read the instructions and went slowly over the config file (have many questions on that one). Made a folder on my web space and uploaded it the files. The instruc said to go to URL www.mysitename.com/path to admin dir/index.php3. This file exists but does not load (I get an error 404 (can't find the file)
    Thatlouguy says "This is a dark ride"

  14. #14
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Right, let's sort this out, cos it is obviously causing you WAY too many headaches. I figure the first thing to do is to get the site up and running on your local machine first, then worry about your host, so let's do that.

    This might seem extreme, but I recommend taking Apache/MySQL/PHP OFF your machine, then downloading a prebuilt kit, and my vote goes for PHPTriad although others exist such as PHPDev.

    Download that and install it, it will put Apache/PHP/MySQL on your machine and install everything for you, including phpmyadmin.

    Do that, and we'll then have a go at loading the data into mysql from your file.
    I swear to drunk I'm not God.
    Matt's debating is not a crime
    Hint: Don't buy a stupid dwarf Clicky

  15. #15
    Apache Expert i_like_php's Avatar
    Join Date
    Nov 2001
    Location
    Dallas, Texas
    Posts
    1,342
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    weirdbeardmt off the subject but i have php 4.1.1 on a windows machine and i was wondering did i have to dl the patch, since php has that possible security flaw???
    i love php

  16. #16
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well yeah you do, but since (I assume) your local machine is for testing only, I wouldn't worry too much about it. It IS possible for your system to be accessed, if for example you are browsing whilst you have say Apache (or IIS whatever...) to be accessed (and I think that is the problem with Apache) so it is worth installing the patch.

    Best bet is probs just to upgrade to the latest version of PHP which is now apparently safe.
    Last edited by weirdbeardmt; Mar 3, 2002 at 19:52.
    I swear to drunk I'm not God.
    Matt's debating is not a crime
    Hint: Don't buy a stupid dwarf Clicky

  17. #17
    Apache Expert i_like_php's Avatar
    Join Date
    Nov 2001
    Location
    Dallas, Texas
    Posts
    1,342
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by weirdbeardmt
    Well yeah you do, but since (I assume) your local machine is for testing only

    yes it's for testing only, so i don't have to worry about it huh??
    i love php

  18. #18
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, its your call, but I think the report was a bit too scary for regular users like me and you... it would defnitiely be worth updating your system, just to be safe, though.
    Last edited by weirdbeardmt; Mar 3, 2002 at 19:54.
    I swear to drunk I'm not God.
    Matt's debating is not a crime
    Hint: Don't buy a stupid dwarf Clicky

  19. #19
    SitePoint Enthusiast
    Join Date
    Feb 2002
    Location
    Nevada USA
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi weirdbeardmt, i_like_php:

    Okay, at this point I think it's best if the two of you speak to me as if I were a child because I'm way too confused. If you'd be kind enough to answer a few questions, maybe I can get this stuff straight.

    To review: right now I have MySQL and phpmyadmin on my local machine. I can connect to the MySQL server and create tables, do queeries, etc. but I cannot upload data files. I also can not get phpmyadmin index.php to run from the folder that I created on my host server. When I attempt to run index.php locally, only the text of the file appears.

    What you suggest is that I delete both MySQL and phpMyadmin from my machine (I don't have Apache). DL PHPtriad and install it. This will put MySQL and phpmyadmin back on my machine and configure it? I take it I should also delete phpmyadmin from my host server as well. Is that correct?

    I had read that the index.php file from phpmyadmin need to be compiled. Is that true? If so would I need to do that too?

    Thanks for sticking with me!
    Thatlouguy says "This is a dark ride"

  20. #20
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is phpmyadmin actually working as it should on your local machine?
    I swear to drunk I'm not God.
    Matt's debating is not a crime
    Hint: Don't buy a stupid dwarf Clicky

  21. #21
    SitePoint Enthusiast
    Join Date
    Feb 2002
    Location
    Nevada USA
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wierd:

    I just read the responses to the other thread. Thanks for answering those questions.

    So phpmyadmin needs to be provided by the host! Uploading those files to my host server was useless. QUESTION: phpmyadmin is suppose to be loaded and run from my local machine to make using MySQL easier (give a GUI to MySQL)?

    I have no idea which version of MySQL my host is running. Is there a way to find out withourt asking them directly?

    I don't know if my host offers phpmyadmin. I didn't see anything in their docs about it. I've only been with this host a short time so I'm still feeling my way through with them. All I know is that they're infatic about not supporting MySQL and keep referring me to the manual.

    Thank god for people like you
    Thatlouguy says "This is a dark ride"

  22. #22
    SitePoint Enthusiast
    Join Date
    Feb 2002
    Location
    Nevada USA
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wierd:

    No. I havn't be able to get phpmyadmin to run on my local machiine.

    I'm opening my browser and loading the file index.php.

    Only the text of the file appears. Am I doing something stupid?
    Thatlouguy says "This is a dark ride"

  23. #23
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Who is your host? Gimme a link! They sound pretty awful.

    You're right about phpmyadmin on both counts, that it a basically a GUI for MySQL and it has to be installed by them.

    As for finding out what version of mysql you have, you should be able to put this in a php file and upload it:

    PHP Code:
    <?php

    phpinfo
    ();

    ?>
    then view the page. As for phpmyadmin not working on your local machine... you have to be running it through a webserver like apache or IIS. You are doing that right?
    I swear to drunk I'm not God.
    Matt's debating is not a crime
    Hint: Don't buy a stupid dwarf Clicky

  24. #24
    SitePoint Enthusiast
    Join Date
    Feb 2002
    Location
    Nevada USA
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Of Course! I knew about phpinfo()! I'll check that!

    The host I'm using is <url>www.arishost.com</url>. They offer cheap space. I havn't determined if they're bad or not. I'm just very frustrated by these problems and stumbling around in the dark.

    I'm also in phptriad and about to DL the file. Should I get version 2.2 or an earlier one?

    Also, NO I'm no running any server software on my machine. I didn't realize I needed to. Would that screw up my O/S config? Should I dedicate a machine just to that? What problem could I expect from that?
    Thatlouguy says "This is a dark ride"

  25. #25
    SitePoint Enthusiast
    Join Date
    Feb 2002
    Location
    Nevada USA
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thatlouguy says "This is a dark ride"


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •