473,624 Members | 2,534 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

phpMyAdmin MySQL proble,

Hi All,
I'm putting a website together using PHP and a MySQL database. I've been
using phpMyAdmin as it makes updating the DB nice and easy. For development,
I've been using Apache, MySQL and PHP installed on my local machine but now
I'm having problems porting to my hoster's server.

To transfer the database contents, I've exported the structure and data of
my local DB to a .sql file and uploaded this to my hosted DB using
phpMyAdmin on the host. This seems to work, but there are two problems:

1). Firstly, the MySQL PASSWORD() command give different results on the host
than it does on my local machine. For example, using phpMyAdmin on my local
machine, typing:

SELECT PASSWORD ('mypassword')

gives a 16 byte number as my books suggest. However, running the same
command on the server gives a 41 bytes code!!!. Consequently, all my login
functionality does not work!.

2). Secondly, I noticed that phpMyAdmin on the host shows a 'Collation'
column with the value 'latin1_swedish _ci'. This column isn't present when
using phpMyAdmin on my local machine, even though the DB contents show be
identical. So what's that all about??.

Thanks for any comments,
Dave
Oct 12 '05 #1
4 1747
Dave Moore schrieb:
Hi All,
I'm putting a website together using PHP and a MySQL database. I've been
using phpMyAdmin as it makes updating the DB nice and easy. For development,
I've been using Apache, MySQL and PHP installed on my local machine but now
I'm having problems porting to my hoster's server.

To transfer the database contents, I've exported the structure and data of
my local DB to a .sql file and uploaded this to my hosted DB using
phpMyAdmin on the host. This seems to work, but there are two problems:

1). Firstly, the MySQL PASSWORD() command give different results on the host
than it does on my local machine. For example, using phpMyAdmin on my local
machine, typing:

SELECT PASSWORD ('mypassword') Your hoster has a newer MySQL version than you have. If you want to use
your scripts, replace PASSWORD through OLD_PASSWORD.

See http://dev.mysql.com/doc/refman/5.0/...d-hashing.html for
more information.
gives a 16 byte number as my books suggest. However, running the same
command on the server gives a 41 bytes code!!!. Consequently, all my login
functionality does not work!.
Leaving 2 for the others due to lack of knowledge ;)
Thanks for any comments,
Dave

hth,
rauch
Oct 12 '05 #2
Thanks Rauch. That explains a lot.

"Rauch Christian" <in**@rauch-webdesign.de> wrote in message
news:di******** *****@news.t-online.com...
Dave Moore schrieb:
Hi All,
I'm putting a website together using PHP and a MySQL database. I've been using phpMyAdmin as it makes updating the DB nice and easy. For development, I've been using Apache, MySQL and PHP installed on my local machine but now I'm having problems porting to my hoster's server.

To transfer the database contents, I've exported the structure and data of my local DB to a .sql file and uploaded this to my hosted DB using
phpMyAdmin on the host. This seems to work, but there are two problems:

1). Firstly, the MySQL PASSWORD() command give different results on the host than it does on my local machine. For example, using phpMyAdmin on my local machine, typing:

SELECT PASSWORD ('mypassword')

Your hoster has a newer MySQL version than you have. If you want to use
your scripts, replace PASSWORD through OLD_PASSWORD.

See http://dev.mysql.com/doc/refman/5.0/...d-hashing.html for
more information.

gives a 16 byte number as my books suggest. However, running the same
command on the server gives a 41 bytes code!!!. Consequently, all my login functionality does not work!.

Leaving 2 for the others due to lack of knowledge ;)

Thanks for any comments,
Dave

hth,
rauch

Oct 12 '05 #3
"Dave Moore" <da**********@p ost2me.freeserv e.co.uk> wrote:
For development,
I've been using Apache, MySQL and PHP installed on my local machine but now
I'm having problems porting to my hoster's server. .... but there are two problems:

1). Firstly, the MySQL PASSWORD() command give different results on the host
than it does on my local machine. SELECT PASSWORD ('mypassword')

gives a 16 byte number as my books suggest. However, running the same
command on the server gives a 41 bytes code!!!. Consequently, all my login
functionality does not work!. ....
2). Secondly, I noticed that phpMyAdmin on the host shows a 'Collation'
column with the value 'latin1_swedish _ci'. This column isn't present when
using phpMyAdmin on my local machine, even though the DB contents show be
identical. So what's that all about??.


As Christian said, you hoster uses a newer MySQL version than you. Both
features were introduced with MySQL 4.1. I suggest you upgrade your
development machine to the latest 4.1 version of MySQL.

Regarding PASSWORD(): the MySQL manual [1] strongly discourages from
using PASSWORD() for your own applications and recommends MD5() or
SHA1() for password hashing.

Regarding character sets and collations: this is great stuff if one
wants to build a multilingual website. For a unilingual application
it's enough to set the defaults for the used tables/databases to the
right values. I suggest reading the manual [2].
[1] http://dev.mysql.com/doc/refman/5.0/...functions.html
[2] http://dev.mysql.com/doc/refman/5.0/en/charset.html
XL
Oct 13 '05 #4
On Thu, 13 Oct 2005 10:35:42 +0200, Axel Schwenke wrote:
"Dave Moore" <da**********@p ost2me.freeserv e.co.uk> wrote:
For development,
I've been using Apache, MySQL and PHP installed on my local machine but now
I'm having problems porting to my hoster's server.

...
but there are two problems:

1). Firstly, the MySQL PASSWORD() command give different results on the host
than it does on my local machine.

SELECT PASSWORD ('mypassword')

gives a 16 byte number as my books suggest. However, running the same
command on the server gives a 41 bytes code!!!. Consequently, all my login
functionality does not work!.

...
2). Secondly, I noticed that phpMyAdmin on the host shows a 'Collation'
column with the value 'latin1_swedish _ci'. This column isn't present when
using phpMyAdmin on my local machine, even though the DB contents show be
identical. So what's that all about??.


As Christian said, you hoster uses a newer MySQL version than you. Both
features were introduced with MySQL 4.1. I suggest you upgrade your
development machine to the latest 4.1 version of MySQL.

Regarding PASSWORD(): the MySQL manual [1] strongly discourages from
using PASSWORD() for your own applications and recommends MD5() or
SHA1() for password hashing.

Regarding character sets and collations: this is great stuff if one
wants to build a multilingual website. For a unilingual application
it's enough to set the defaults for the used tables/databases to the
right values. I suggest reading the manual [2].
[1] http://dev.mysql.com/doc/refman/5.0/...functions.html
[2] http://dev.mysql.com/doc/refman/5.0/en/charset.html
XL

Correct me if I'm wrong.
Using the MD5() hash hashes the password into an unrecoverable string. So
when you then ask for a password from your user, you need to MD5() the
given password and compare that to the stored hash.

This is what I'm doing but it also causes you to not be able to
recover/discover a password for a user. You can then only reset the
password if the user forgets theirs.

I combine the password with a number of pertinent facts about the user,
name etc, plus a string of my own choosing. I then combine all this stuff
and hash with MD5(), the PHP function not with MySQL, and store the
resulting string in the DB. Then at log in, I pull the DB info for the
user attempting to log in, by userid, and hash this info with the given
password and compare it to the stored password.

Works so far.....

Chris

Oct 15 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2329
by: Roger | last post by:
I've just tried installing phpMyAdmin but it looks like I did somethin wrong. How did I install: 1. Installed Apache 2.0.48 2. Installed php 4.3.4 3. Installed Mysql 3.23.58 4. After installing Mysql I ran winmysqladmin.exe and created a username Timmers and password yyyyy
4
2871
by: JimC | last post by:
I have PHP installed on a Windows XP platform using IIS as server. When updating a MySQL database field set to MEDIUMTEXT in phpMyAdmin, the transaction seems to fail if the text contains more than a few hundred characters. The update is actually made successfully, but afterwards, the server cannot locate the phpMyAdmin page as requested by the client browser. I get a "Page cannot be found" error. Clicking on Update from the browser...
0
1969
by: Mechphisto | last post by:
Not sure if this is truly a mySQL issue or a PHP issue, since the problem started when I reconfigured/made a PHP upgrade:We're using RedHat ES2.1. With PHP 4.1.3 and phpMyAdmin 2.5.6, it was working fine. Then I upgraded to PHP 4.3.4. And I started getting the error: MySQL said: #2002 - Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) through phpMyAdmin, and from mySQL at the command line: #2002 - Can't connect...
0
1891
by: phpnube | last post by:
I used this php package to install on my system... (i had problems with the isapi package from php so im back to the cgi portion of PHP php-cgi.exe) PHP 5.0.0 installer - 26 July 2004 (CGI only, packaged as Windows installer to install and configure PHP, and automatically configure IIS, PWS and Xitami, with manual configuration for other servers. N.B. no external extensions included It works fine... as the test page outputs the...
0
1495
by: Gnarlodious | last post by:
This is some odd behavior, I'm hoping someone can explain. I have a TiBook running 4.0.17 and phpMyAdmin 2.5.5-pl1 where MySQL hostname is configured as "Gnarlodious-TiBook" (machinename). So far so good, all works OK. I have a Cube running 4.0.20 and phpMyAdmin 2.5.5-pl1 where MySQL hostname is configured as "Gnarlodious-Cube" (machinename). But now phpMyAdmin can't login, throwing error
2
9020
by: Daniel Mercier | last post by:
Hi, I'm new to mysql and just installed phpmyadmin. Here is the versions info: System Linux linlyne.spider.sense 2.4.22-1.2199.nptl #1 PHP Version 4.3.8
5
3361
by: NewbieSupreme | last post by:
I installed Apache 2.0.58, tested it, got the "working" page. Installed MySQL 5.0.22, and didn't really see how to test that, but there is a mysql process running in the task manager. Ran through the PHP 5.1.4 installation directions, and that seems to work, since I can use phpinfo() and get all the information on a test php page. Then I installed (really just unzipped and placed some files according to the directions) PHPMyAdmin; did...
0
3467
by: NewbieSupreme | last post by:
I'm using PHPMyAdmin on an Apache2Triad install (latest version; 5.x.x, which installs PHP5 and PHPMyAdmin 2.8 as well). In Access, I exported a table to a text file, tab-delimited, text qualifyer of "none" (this is how I read to do it from newsgroups). When I use the Query window in phpmyadmin to import the text file, it waits a while, then returns an error: #1064 - You have an error in your SQL syntax; check the manual that...
8
8876
by: Jonathan Sachs | last post by:
I just tried to install phpMyAdmin on my system, and I can't get it to work. When I tried to run the setup procedure (setup.php) I got the following message: Fatal error: session_start() : Failed to initialize storage module: user (path: C:\...\Temp\php\session) in D\...\phpMyAdmin\libraries\session.inc.php on line 86 I set up the config file by hand, then tried to run phpMyAdmin and got the same error.
0
8672
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8614
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8330
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8471
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7153
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5561
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4167
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2603
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1474
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.