cancel
Showing results for 
Search instead for 
Did you mean: 

PHPMyAdmin/MySQL Administration Help

Highlighted
Dabbler
Posts: 12
Registered: ‎09-08-2007

PHPMyAdmin/MySQL Administration Help

Hi
As I am a complete novice with PHP and MySQL can any one help or at least point me in the right direction regarding inserting a record/user into a MySQL Database. If there are instructions on how to do this what link would I need to follow?
I have just found out that when the Database and PHP files are uploaded the Database is only the shell and will not contain any data.
After going into PHPMyAdmin I see the Database shell which clearly states No records. I quess I will need to use the Insert Tab. However within this there appears to be two Databases, the second one appears to be repeat of the first one except that above there is a checkbox entitled ignore which is ticked. Do I enter my records in the first or second one?
Many thanks in anticipation.
Barry
9 REPLIES 9
Highlighted
Community Veteran
Posts: 14,469
Registered: ‎30-07-2007

Re: PHPMyAdmin/MySQL Administration Help

First I need to understand what you are doing. I'm guessing the php files are not what you have created but something you have downloaded and want to use on your webspace If so what is the package called?
Once I know that we go to the next step.
Note: Most of the packages you can download have installation instructions so read then in full. Many have a php install page which you run which will create the necessary tables and populate the database if necessary so just follow the set-up/install instructions.
Highlighted
Dabbler
Posts: 12
Registered: ‎09-08-2007

Re: PHPMyAdmin/MySQL Administration Help

Hi Peter
The package is EasyGen which has an export routine to upload into MySQL space.
I have been told though that it only uploads a DB shell, without data. Through MySQL Admin I have created two records. When I previed the project locally (localhost) everything worked fine. Now, live it will not accept my Password and Username which it should get from the records i created in the Db.
Many Thanks
Barry
Highlighted
Community Veteran
Posts: 14,469
Registered: ‎30-07-2007

Re: PHPMyAdmin/MySQL Administration Help

Ah yes, I forgot you were using that.
Does it not create a default login? Have a read of the manual and see what it says about putting the code on your webserver and what defaults it sets for you. Does the package allow you to create a login within it which can then be used on the webserver?
When adding records you may need to change the function column to PASSWORD or MD5 so it is encrypted in the correct way - the manual should state what encryption should be used. If you just see your password in plain text I suspect you need to store it encrypted.
Highlighted
Dabbler
Posts: 12
Registered: ‎09-08-2007

Re: PHPMyAdmin/MySQL Administration Help

Peter
Yes the login page is created within the package, which runs fine locally.
There is not much within the manual that helps with regards to uploading to the webserver only that getting the mapping right is important ie going from Access to MySQL. It took ages to work this bit out but when I look at the code it seems to be correct in that it does not mention Access, or Provider=Microsoft.Jet.OLEDB.4.0 but I presume correctly refers to $eg_objConn1 = mysql_connect with all the passwords needed to connect to the server following that.
Not 100% sure what you mean by changing the function, but I can say that when I view the site live when the Password is entered it is asterisked out so I quess is OK. The only concern I would have though is that the other fields columns within the DB table at MySQL Admin have a property set as NULL, although the crucial ones ID, Username, Password etc are all OK, auto increment etc. I had assumed that all I would do is to create the first record through MySQL Admin then by logging on as the Administrator (live) would then be able to add further records.
Sorry for being so long winded.
Many Thanks
Barry
Highlighted
Community Veteran
Posts: 14,469
Registered: ‎30-07-2007

Re: PHPMyAdmin/MySQL Administration Help

When you added the records in phpMyAdmin there is a function drop-down column for each field. For the password field you probably need to select either PASSWORD or MD5. This then causes the entered password to be stored in the database encrypted which is what I suspect the login page is comparing your entered password against (after encrypting it). The * on entering the password is normal on a password input field.
As I don't know the package you are using I can't really help much more.
Highlighted
Dabbler
Posts: 12
Registered: ‎09-08-2007

Re: PHPMyAdmin/MySQL Administration Help

Peter
At the momement the password is set to VARCHAR (10), from the drop down I do not have the option to set it to MD5 but I can set it to Password, which I have tried. When I do this though it generates an Error in SQL Query #1064. II'll try Googling the error code and see what I get). Incidentally all the other fields are set to VARCHAR either (10) or (50). The ID number is correctly set to Auto Increment.
You had mentioned in an earlier communication about other software packages being out there that did the same sort of thing as easyGen. Bearing in mind the issues I have been having, can you recommend one that might be a little less time consuming and a little more user friendly? (Or do all such packages have the same sort of issues?)
Again thanks for all your help.
Highlighted
Superuser
Superuser
Posts: 896
Thanks: 463
Fixes: 1
Registered: ‎05-04-2007

Re: PHPMyAdmin/MySQL Administration Help

Quote from: Portsmouth
Hi
As I am a complete novice with PHP and MySQL can any one help or at least point me in the right direction regarding inserting a record/user into a MySQL Database. If there are instructions on how to do this what link would I need to follow?

I have to admit to not having been able to follow much of the subsequent discussion 😕  however I have no problems using php/mysql on the servers here, by means of (a) creating the db itself (just the shell), then (b) telnetting in whatever content I want in there (and finally (c) using php to call up whatever data is required, via cgi).
If the method I use (which took me a while to figure out by means of the help guides on the portal, usertools etc. plus a fair amount of trial and error) would be of interest, I'd be happy to post it up here.
If that isn't at all what you were looking for, just say Smiley
Regards,
Penny.
Penny Rollo * Force 9 from 17/02/98 * PlusNet from 2000 onwards
Project HappyChild - free maths worksheets, free French-English
worksheets and 12 other languages
personal site www.pennymidasrollo.plus.com
Highlighted
Community Veteran
Posts: 14,469
Registered: ‎30-07-2007

Re: PHPMyAdmin/MySQL Administration Help

Portsmouth, I am talking about the insert page, not the table definition page. When you inserted your data you can set a function on each of the fields.
In phpMyAdmin, select the table you added data to, then click the browse tab to view your data. Then tick the small box next to each of the records shown and click the pen icon at the bottom to edit the records. This takes you to a page to allow you to change the data. For each of the passwords, select PASSWORD or MD5 on the function drop down and save the change. Then see if you can login. If not, try the other setting.
You really need to read up on using MySQL and phpMyAdmin so go to their websites and download / read the documentation.
Highlighted
Dabbler
Posts: 12
Registered: ‎09-08-2007

Re: PHPMyAdmin/MySQL Administration Help

Hi
Just thought I would post the solution to my previous problems. It appears that within the PHP script it was referencing
$eg_recResult1 = mysql_query("SELECT `easyGen_userDetails` etc etc.
Reading various forums this is case sensitive so I changed it to
$eg_recResult1 = mysql_query("SELECT `easygen_userdetails` etc etc.
And Bingo everything just worked.
Many thanks for all you help.
Barry