Hướng dẫn mysql_secure_installation command not found - không tìm thấy lệnh mysql_secure_installation

Tôi đang cố gắng học PHP và tôi chỉ đang trong quá trình cài đặt Apache, MSQL và PHP.

Tôi đang ở trên Mac OSX 10.7.2

Tôi đã tải xuống: mysql-5.5.18-osx10.6-x86_64.dmg

Bây giờ tôi đang ở điểm đặt mật khẩu gốc và khi tôi nhập: sudo: mysql_secure_installation, nó yêu cầu tôi nhập mật khẩu của mình, thì nó nói:

sudo: mysql_secure_installation: không tìm thấy lệnh

Bất kỳ trợ giúp sẽ được đánh giá cao.

Hướng dẫn mysql_secure_installation command not found - không tìm thấy lệnh mysql_secure_installation

Hennes

64.2K7 Huy hiệu vàng110 Huy hiệu bạc165 Huy hiệu đồng7 gold badges110 silver badges165 bronze badges

Hỏi ngày 2 tháng 12 năm 2011 lúc 21:04Dec 2, 2011 at 21:04

3

Nếu bạn cài đặt MariaDB qua trình quản lý gói, bạn sẽ có cùng một lỗi hiện nay có thể được giải quyết bằng cách sử dụng điều này là thay thế tên Mariadb mới:

mariadb-secure-installation

Đã trả lời ngày 12 tháng 7 năm 2021 lúc 0:48Jul 12, 2021 at 0:48

UnicornistunicornistUnicornist

2112 Huy hiệu bạc5 Huy hiệu Đồng2 silver badges5 bronze badges

1

Đường dẫn của bạn có thể không được cập nhật vì bạn đã sử dụng DMG. Vì vậy, bạn sẽ cần chạy điều này với đường dẫn đầy đủ hoặc sửa đổi đường dẫn của bạn để bao gồm.

Có lẽ là một cái gì đó như:

/usr/local/mysql/bin/mysql_secure_installation

Tôi cho rằng bạn đã làm theo hướng dẫn tham khảo

Đã trả lời ngày 2 tháng 12 năm 2011 lúc 21:11Dec 2, 2011 at 21:11

4

Điều này sẽ hoạt động:

cd /usr/local/mysql
sudo bin/mysql_secure_installation

Như thông báo lỗi Can't find a 'mysql' client in PATH or ./bin đã nói, mysql_secure_installation đang tìm kiếm một máy khách mysql trong đường dẫn của bạn hoặc ./bin thư mục - Vì vậy, nếu bạn muốn nó tìm/usr/local/mysql/bin/mysql /mysql.

Đã trả lời ngày 26 tháng 8 năm 2014 lúc 20:42Aug 26, 2014 at 20:42

Trong trường hợp của tôi:

ls -ld /usr/local/mysql*
lrwxr-xr-x   1 root  wheel   27 Apr 10 16:43 /usr/local/mysql -> mysql-5.6.24-osx10.8-x86_64
drwxr-xr-x  17 root  wheel  578 Apr 10 16:43 /usr/local/mysql-5.6.24-osx10.8-x86_64

Vì vậy, tôi đặt đường dẫn mới vào môi trường đường dẫn của mình:

cd $HOME    
cat .bashrc 
export PATH="$PATH:/usr/local/mysql/bin/"
source .bashrc

mysql_secure_installation 



NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MySQL to secure it, we'll need the current
password for the root user.  If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):

Chúc mừng

Đã trả lời ngày 10 tháng 4 năm 2015 lúc 5:12Apr 10, 2015 at 5:12

Feb072022 07 2022

    Hướng dẫn mysql_secure_installation command not found - không tìm thấy lệnh mysql_secure_installation
    Bạn vừa cài đặt MariaDB và như thường lệ muốn thực hiện cấu hình ban đầu bằng cách chạy tập lệnh mysql_secure_installation nhưng lỗi là:MariaDB and as usual want to perform initial configuration by running mysql_secure_installation script but the error is:

    MariaDB_Secure_Installation: Không tìm thấy lệnh

    Đối với các thiết lập Mariadb, bạn nên sử dụng các mục sau:MariaDB set ups you should use the following:

    mariadb-secure-installation-secure-installation

    Khi bắt đầu ROM Mariadb 10.4.6, mariadb-secure-installation là một liên kết với mysql_secure_installation. Từ Mariadb 10.5.2, mysql_secure_installation là Symlink và mariadb-secure-installation là tên nhị phân. Chúc may mắn!
    From MariaDB 10.5.2, mysql_secure_installation is the symlink, and mariadb-secure-installation is the binary name.
    Good luck!

    Muốn tôi làm điều này cho bạn? LOT Me A Line: Itgalaxyzzz {at} gmail [point] com Drop me a line: itgalaxyzzz {at} gmail [point] com

    Hướng dẫn mysql_secure_installation command not found - không tìm thấy lệnh mysql_secure_installation
    Hướng dẫn mysql_secure_installation command not found - không tìm thấy lệnh mysql_secure_installation