WebSite X5Help Center

 
Derek K.
Derek K.
User

Date Base Viewer Problem  en

Autor: Derek K.
Visitado 964, Seguidores 1, Compartilhado 0  

I have installed the data base viewer and set up a data base on my server using SQL. The web page I am using is only showing the search tool and no tables. Mt hosting company is posting this but I do not understand where the code should be entered

The MySQL extension can only be used with earlier PHP versions, up to 5.6. In PHP 7.0, the MySQL extension was removed and MySQLi (or alternatively PDO) must be used instead.

Copy the following code and paste it in your PHP script to establish a database connection. For your security, the password is not shown. Please change your password manually in the code.

<?php $host_name = 'db5000294173.hosting-data.io'; $database = 'dbs287378'; $user_name = 'dbu305708'; $password = '<Enter your password here.>'; $connect = mysql_connect($host_name, $user_name, $password, $database); if (mysql_errno()) { die('<p>Failed to connect to MySQL: '.mysql_error().'</p>'); } else { echo '<p>Connection to MySQL server successfully established.</p >'; } ?>

Can anyone help me with this as everything looks as it should.

I get this message when I export my website - the following tests for MySql data base settings failed

Thanks

Publicado em
5 RESPOSTAS - 1 CORRIGIR
Derek K.
Derek K.
User
Autor

Problem solved missed digit in data entry

Ler mais
Publicado em de Derek K.
Derek K.
Derek K.
User
Autor

I now have the connection to the server working but still not getting any data in my data base viewer. Any ideas

Thanks Derek

Ler mais
Publicado em de Derek K.
John S.
John S.
User

Have you specified your connection in the Database settings in X5?

Ler mais
Publicado em de John S.
John S.
John S.
User

When this is done, you have to pick the newly created/specified database in the database field, and you have to manually specify the table name. If uppercase is used for the tablename then you also have to use uppercase for the name here.

If all is done properly you should see data in the table.

Ler mais
Publicado em de John S.
Aleksej H.
Aleksej H.
Moderator

Hello.In this video, I showed an example of setting up this object.Perhaps the video will be useful to you.

Ler mais
Publicado em de Aleksej H.