Jump to content


Photo

[HH#33064] Problema Mysql


  • Please log in to reply
21 replies to this topic

#1 HelioHost

HelioHost

    Announcements

  • Moderators
  • 4,133 posts
  • Gender:Not Telling

Posted 17 January 2018 - 10:47 PM

Username: ojedajvi, Server: Ricky, Main domain: ojedajvi.heliohost.org

Buenas quisiera que me ayudaran, estoy tratando de cofigurar mi BD con
heliohost pero pense que el nombre del host era mi propia pagina
http://ojedajvi.heliohost.org

quisiera saber el nombre de la conexion el cual tengo que colocar en mi
cadena de BD para MYSQL

Correo: ojedajvier1986@gmail.com

translate.google.com:

Good, I would like you to help me, I am trying to make my BD with
heliohost but I thought the host name was my own page
http://ojedajvi.heliohost.org

I would like to know the name of the connection which I have to place in my
BD string for MYSQL

Edited by Krydos, 18 January 2018 - 12:09 AM.
translated

This is an unmonitored account for announcements only.
Wiki | Facebook | Twitter
Posted ImagePosted ImagePosted Image
Posted ImagePosted ImagePosted Image

#2 Krydos

Krydos

    Rank X Member

  • Root Admin
  • 16,396 posts
  • Gender:Male

Posted 18 January 2018 - 12:10 AM

Use localhost.

#3 ojedajvi

ojedajvi

    Rank I Member

  • Members
  • Pip
  • 10 posts

Posted 18 January 2018 - 02:11 PM

bueno e colocado mi cadena de conexion de la siguiente manera:


<?php
$host_db = "localhost"; // Host de la BD
$usuario_db = "ojedajvi_javier"; // Usuario de la BD
$clave_db = "CLAVE"; // Contraseña de la BD
$nombre_db = "ojedajvi_alejandrotortoza"; // Nombre de la BD

//conectamos y seleccionamos db
mysql_connect($host_db, $usuario_db, $clave_db);
mysql_select_db($nombre_db);
?>


y me sigue apareciendo el mismo error, carga la pagina principal todo chevere pero al momento de llamar la otra pagina que es dondepongo mi login y usuario me lanza la siguein imagen:

https://ibb.co/kJBMWm

translate.google.com:

good and placed my connection string as follows:

<? php
$ host_db = "localhost"; // Host of the BD
$ user_db = "ojedajvi_javier"; // BD user
$ clave_db = "PASSWORD"; // Password of the BD
$ db_name = "ojedajvi_alejandrotortoza"; // Name of the BD

// connect and select db
mysql_connect ($ host_db, $ user_db, $ password_db);
mysql_select_db ($ db_name);
?>

and I still see the same error, load the main page all chevere but when calling the other page that is where I put my login and user launches the following image:[/size][/font]

https://ibb.co/kJBMWm

Attached Files



#4 Luigi123

Luigi123

    Rank X Member

  • Moderators
  • 1,051 posts
  • Gender:Male
  • Location:Winnipeg, Manitoba, Canada

Posted 18 January 2018 - 03:39 PM

You have to set all php files permission to 644 and all directory files permission to 755

server_load_s.gifserver_load_j.gifserver_load_t.gif
server_uptime_s.gifserver_uptime_j.gifserver_uptime_t.gif

 


#5 ojedajvi

ojedajvi

    Rank I Member

  • Members
  • Pip
  • 10 posts

Posted 18 January 2018 - 07:21 PM

Buenas gracias por responder,
 
Asi mismo tengo mis directorios porque asi estuve leyendo en foros, veras con la siguiente imagen la configuracion de mis archivos y el error que me sale.
 
asi tengo mi directorio con los permisos y el siguiente error me sigue saliendo como sale en las imagenes adjuntas

translate.google.com:

Good thanks for answering, 

So I have my directories because I was reading in forums, you will see with the following image the configuration of my files and the error that I get. 

So I have my directory with the permissions and the following error keeps coming to me as it appears in the attached images

Attached Files


Edited by Krydos, 18 January 2018 - 07:24 PM.
translated


#6 Krydos

Krydos

    Rank X Member

  • Root Admin
  • 16,396 posts
  • Gender:Male

Posted 18 January 2018 - 07:29 PM

The problem is now that you changed the permissions of your /home/ojedajvi/public_html/ directory to 777. It needs to be 750 like it was when your account was created. I went ahead and changed it back for you http://ojedajvi.heli...org/user/login/

#7 ojedajvi

ojedajvi

    Rank I Member

  • Members
  • Pip
  • 10 posts

Posted 18 January 2018 - 07:41 PM

Perfecto muchas Gracias ya se soluciono eso Exito!!!!!
 
Puedes chequear si la conexion mysql es la adecuaca? ya que no me puedo conectar con la base de datos
 
se me indico que como host pusiera "localhost" no se si es lo correcto te dejo mi cadena de coxion de codigo
<?php
    $host_db = "localhost"; // Host de la BD
    $usuario_db = "ojedajvi_javier"; // Usuario de la BD
    $clave_db = "<removed>"; // Contraseña de la BD
    $nombre_db = "ojedajvi_alejandrotortoza"; // Nombre de la BD
    
    //conectamos y seleccionamos db
    mysql_connect($host_db, $usuario_db, $clave_db);
    mysql_select_db($nombre_db);
?>
translate.google.com:

Perfect thank you very much already solved that Success !!!!! 

Can you check if the mysql connection is appropriate? since I can not connect to the database 

I was told that as host put "localhost" I do not know if it is the right thing I leave my code coxion chain

Edited by Krydos, 18 January 2018 - 07:44 PM.
translated


#8 Krydos

Krydos

    Rank X Member

  • Root Admin
  • 16,396 posts
  • Gender:Male

Posted 18 January 2018 - 07:46 PM

What error do you get?

#9 ojedajvi

ojedajvi

    Rank I Member

  • Members
  • Pip
  • 10 posts

Posted 18 January 2018 - 07:54 PM

este es el error que vota, es la misma conexion que uso para todo que la anexe en la imagen arriba.
 
el error es como si no llamara a mis BD a las tablas a la que llamo.
 <?php
    $host_db = "localhost"; // Host de la BD
    $usuario_db = "ojedajvi_javier"; // Usuario de la BD
    $clave_db = "<removed>"; // Contraseña de la BD
    $nombre_db = "ojedajvi_alejandrotortoza"; // Nombre de la BD
    
    //conectamos y seleccionamos db
    mysql_connect($host_db, $usuario_db, $clave_db);
    mysql_select_db($nombre_db);
?> 

Attached Files


Edited by Krydos, 18 January 2018 - 08:01 PM.


#10 Krydos

Krydos

    Rank X Member

  • Root Admin
  • 16,396 posts
  • Gender:Male

Posted 18 January 2018 - 08:01 PM

What version of php are you using?

#11 ojedajvi

ojedajvi

    Rank I Member

  • Members
  • Pip
  • 10 posts

Posted 18 January 2018 - 08:06 PM

esta 

 

ea-php71



#12 Krydos

Krydos

    Rank X Member

  • Root Admin
  • 16,396 posts
  • Gender:Male

Posted 18 January 2018 - 08:09 PM

mysql_connect doesn't exist in php 7.1. It's been deprecated for years in php 5. You need to use an older version of php (like 5.6) or use mysqli instead. I recommend mysqli.

#13 ojedajvi

ojedajvi

    Rank I Member

  • Members
  • Pip
  • 10 posts

Posted 18 January 2018 - 08:21 PM

veras en vista de lo que me comentas apesar de ser obseloto funciona bien, pero hice una nueva construccion de cadena y sigue lo mismo, te dejo la nueva cadena con mysqli
<?php
$con = mysqli_connect("localhost","ojedajvi_javier","<removed>","ojedajvi_alejandrotortoza");

// Check connection
if (mysqli_connect_errno())
  {
  echo "Failed to connect to MySQL: " . mysqli_connect_error();
  }
?>
translate.google.com:

You will see in view of what you tell me in spite of being obsessed it works well, but I made a new chain construction and it follows the same, I leave you the new chain with mysqli

Edited by Krydos, 18 January 2018 - 08:29 PM.
translated


#14 Krydos

Krydos

    Rank X Member

  • Root Admin
  • 16,396 posts
  • Gender:Male

Posted 18 January 2018 - 08:30 PM

it works well

So, are you saying it's working? Perhaps you could translate your own posts?

#15 ojedajvi

ojedajvi

    Rank I Member

  • Members
  • Pip
  • 10 posts

Posted 18 January 2018 - 08:32 PM

It does not work for me, it throws the same error, it modifies my connection string with mysqli_connect but it launches the same thing, I can not connect to the DB, it keeps on throwing me the same error

 

 

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/ojedajvi/public_html/admin/login/acceso_db.php:8 Stack trace: #0 {main} thrown in /home/ojedajvi/public_html/admin/login/acceso_db.php on line 8






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users