مرحباً،
أولاً، شكرًا جزيلًا على هذا الدليل الرائع. أقدر العمل الذي بُذل في هذا.
بخصوص مشكلتي:
أواجه صعوبة في الاتصال بقاعدة البيانات عند تشغيل سكريبت الاستيراد، رغم أنني أستخدم MariaDB لاستضافة نسخة احتياطية من vBulletin بدلاً من MySQL. لقد تأكدت من تشغيل MariaDB، وأستطيع استيراد نسخة احتياطية من vBulletin إليها، وقد راجعت اسم المستخدم واسم المضيف وكلمة المرور في السكريبت أربع مرات، لكن دون جدوى.
أشعر أنني أغفلت شيئًا بسيطًا، وإذا أمكن لأحد أن يرشدني إلى الاتجاه الصحيح، فسيكون ذلك مفيدًا جدًا.
أستخدم الإصدارات التالية:
mysql2 0.5.2
mariadb-server-10.3
discourse master git commit cb8fa46
التفاصيل الكاملة أدناه
عند محاولة تشغيل الأمر التالي:
apt-get update && apt-get install libmysqlclient-dev mysql-server-5.7
أحصل على خطأ:
E: Package 'libmysqlclient-dev' has no installation candidate
E: Package 'mysql-server-5.7' has no installation candidate
وهو أمر مفهوم، ربما تم إزالة هذه الحزم من المستودع منذ ذلك الحين.
لذلك، بدلاً من ذلك، أقوم بتشغيل:
apt-get update && apt-get install mariadb-server-10.3 libmariadbd-dev
يعمل MariaDB كبديل مباشر وهو أمر رائع لأن جميع الخطوات تعمل حتى أحاول تشغيل سكريبت الترحيل، وعندها أحصل على الخطأ التالي:
root@discourse:/src# su discourse -c 'bundle exec ruby script/import_scripts/vbulletin.rb'
root:@localhost wants vb4
Loading existing groups...
Loading existing users...
Loading existing categories...
Loading existing posts...
Loading existing topics...
==================================================
Access denied for user 'root'@'localhost'
Cannot connect in to database.
Hostname: localhost
Username: root
Password:
database: vb4
Edit the script or set these environment variables:
export DB_HOST="localhost"
export DB_NAME="vbulletin"
export DB_PW=""
export DB_USER="root"
export TABLE_PREFIX="vb_"
export ATTACHMENT_DIR '/path/to/your/attachment/folder'
Exiting.
بالنسبة للأذونات:
root@discourse:/src# mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 59
Server version: 10.3.17-MariaDB-0+deb10u1 Debian 10
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> show grants;
+------------------------------------------------------------------------------------------------+
| Grants for root@localhost |
+------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED VIA unix_socket WITH GRANT OPTION |
| GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION |
+------------------------------------------------------------------------------------------------+
2 rows in set (0.000 sec)
لقد راجعت اسم المستخدم وكلمة المرور عدة مرات، وحتى قمت بضبطهما يدويًا بنفسي.
