Professional Web Applications Themes

phpMyAdmin MySQL proble, - MySQL

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 ...

  1. #1

    Default 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


    Dave Moore Guest

  2. #2

    Default Re: phpMyAdmin MySQL proble,

    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 [url]http://dev.mysql.com/doc/refman/5.0/en/password-hashing.html[/url] 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
    Rauch Christian Guest

  3. #3

    Default Re: phpMyAdmin MySQL proble,

    Thanks Rauch. That explains a lot.

    "Rauch Christian" <inforauch-webdesign.de> wrote in message
    news:dijvjk$o7l$05$1news.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 [url]http://dev.mysql.com/doc/refman/5.0/en/password-hashing.html[/url] 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

    Dave Moore Guest

  4. #4

    Default Re: phpMyAdmin MySQL proble,

    "Dave Moore" <dave_m_moorepost2me.freeserve.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] [url]http://dev.mysql.com/doc/refman/5.0/en/encryption-functions.html[/url]
    [2] [url]http://dev.mysql.com/doc/refman/5.0/en/cht.html[/url]


    XL
    Axel Schwenke Guest

Similar Threads

  1. Importing DB using MySQL, PHPMyAdmin
    By NewbieSupreme in forum MySQL
    Replies: 1
    Last Post: June 15th, 09:08 PM
  2. Hosting Company CF/MySQL/Phpmyadmin
    By Boiler2005 in forum Macromedia ColdFusion
    Replies: 6
    Last Post: March 8th, 11:54 AM
  3. phpMyAdmin and MySQL
    By max in forum PHP Development
    Replies: 5
    Last Post: December 23rd, 06:53 AM
  4. #26208 [NEW]: phpmyadmin-2.5.4 + mysql-4.0.15 = crash
    By temnota at kmv dot ru in forum PHP Development
    Replies: 0
    Last Post: November 11th, 08:42 PM
  5. Problems with phpMyAdmin and mySQL
    By Michael Forster in forum Linux Setup, Configuration & Administration
    Replies: 2
    Last Post: August 21st, 05:50 PM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139