0

I've upgraded from a 6 year old Xampp to the next latest one: xampp-win32-7.0.23-0-VC14-installer.exe

  1. Before install I did a Mysql Dump All: mysqldump -u root -p --all-databases > all-db-dump.sql

  2. After install I Imported that all-db-dump.sql from phpMyAdmin.

  3. When starting my PHP-application filmtv.php I get the above errors, see attached filmtv.php.png.

Look at the source samples and I hope someone out there have an idea of whats wrong, cause I expected it to work smoothly without having to change my application. Also, if I do a minor change using phpMyAdmin like adding a new user then I cannot use phpMyAdmin anymore it'll respond that user/pwd is incorrect, very strange. Up to now I've done 5 re-installs because of that.

From phpMyAdmin user: root localhost Yes ALL PRIVILEGES

filmtv.php Warning: mysqli_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES) in C:\xampp\htdocs\css\bertil.php on line 2 Warning: mysqli_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES) in C:\xampp\htdocs\css\bertil.php on line 3

Fatal error: Uncaught Error: Call to undefined function mysql_error() in C:\xampp\htdocs\filmtv.php:156 Stack trace: #0 {main} thrown in C:\xampp\htdocs\filmtv.php on line 156

filmtv.php includes
    include 'css/adam.php';
    include 'css/bertil.php';  
    if (!$cxn) {    echo "Unable to connect to DB: " . mysql_error();
    exit;}

Source-code:
*adam.php:*
    <?php
     $user="root";
     $host="localhost";
     $password="tenthirty";
     $database = "ljung";
?
*bertil.php:*
    <?php
      $cxn = mysqli_connect($host,$user,$password,$database);
      $cxu = mysqli_connect($host,$user,$password,$database);
    ?>

_By the way, my Xampp install is: Includes: Apache 2.4.27, MariaDB 10.1.26, PHP 7.0.23, phpMyAdmin 4.7.4, OpenSSL 1.0.2, XAMPP Control Panel 3.2.2, Webalizer 2.23-04, Mercury Mail Transport System 4.63, FileZilla FTP Server 0.9.41, Tomcat 7.0.56 (with mod_proxy_ajp as connector), Strawberry Perl 7.0.56 Portable_ _ Cheers, Torbjorn Stockholm

1 Answers1

0

In the newest version of Xampp they start to use mariadb instead of mysql so you can't log in as root user so you have to create new user and grant your privileges in that user

mohammed
  • 26
  • 1
  • 9
  • Yes I've tried that. I created a new user/localhost from phpMyAdmin and clicked the Grant-option. It seemed to work. But after that I couldn't start phpMyAdmin, it said something like user/pwd not allowed, so I had to reinstall the entire Xampp. Crazy ! I don't understand how that could affect using phpMyAdmin ???? – user3437733 Oct 03 '17 at 22:16
  • i installed the same version of xampp that you are using and i had no troubles using it ,it works like charm for me – mohammed Oct 06 '17 at 07:01