dump3cz
Üyeliği Durdurulmuş
Banlı Kullanıcı
-
Üyelik
01.05.2017
-
Yaş/Cinsiyet
25 / E
-
Meslek
Yazılım
-
Konum
Bilecik
-
Ad Soyad
O** Ç**
-
Mesajlar
1749
-
Beğeniler
169 / 326
-
Ticaret
3, (%67)
mysql bilgine bağlanabiliyor musun?
MrTr
Developer
Kullanıcı
-
Üyelik
14.10.2017
-
Yaş/Cinsiyet
31 / E
-
Meslek
Yazılım Uzmanı
-
Konum
İstanbul Avrupa
-
Ad Soyad
E** Ö**
-
Mesajlar
46
-
Beğeniler
2 / 10
-
Ticaret
1, (%100)
// Name of the file
$filename = 'churc.sql';
// MySQL host
$mysql_host = 'localhost';
// MySQL username
$mysql_username = 'root';
// MySQL password
$mysql_password = '';
// Database name
$mysql_database = 'dump';
// Connect to MySQL server
mysql_connect($mysql_host, $mysql_username, $mysql_password) or die('Error connecting to MySQL server: ' . mysql_error());
// Select database
mysql_select_db($mysql_database) or die('Error selecting MySQL database: ' . mysql_error());
// Temporary variable, used to store current query
$templine = '';
// Read in entire file
$lines = file($filename);
// Loop through each line
foreach ($lines as $line)
{
// Skip it if it's a comment
if (substr($line, 0, 2) == '--' || $line == '')
continue;
// Add this line to the current segment
$templine .= $line;
// If it has a semicolon at the end, it's the end of the query
if (substr(trim($line), -1, 1) == ';')
{
// Perform the query
mysql_query($templine) or print('Error performing query \'' . $templine . '\': ' . mysql_error() . '
');
// Reset temp variable to empty
$templine = '';
}
}
echo "Tables imported successfully";
?>
Stackoverflow da böyle bir soruya verilen onaylı cevap.Gerekli alanları kendinize göre düzenleyip yedek alabilirsiniz
Tema tasarımı,Özel yazılım,Reklam ve Grafik(logo,banner ve baskı) işlemleriniz için ulaşabilirsiniz.
-
Üyelik
06.10.2017
-
Yaş/Cinsiyet
36 / E
-
Meslek
Kimya Mühendisi
-
Konum
Konya
-
Ad Soyad
E** Ö**
-
Mesajlar
78
-
Beğeniler
5 / 0
-
Ticaret
0, (%0)
Bunu zaten yapmıştım fakat şöyle bir hata veriyor:
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home3/limon/public_html/sites/atlas/importdb.php on line 15
Warning: file(churc.sql): failed to open stream: No such file or directory in /home3/limon/public_html/sites/atlas/importdb.php on line 22
Warning: Invalid argument supplied for foreach() in /home3/limon/public_html/sites/atlas/importdb.php on line 24
Tables imported successfully
Openix.io | $9.90 PositiveSSL | $12.90 RapidSSL