As most organizations and companies depend on the database to process confidential information, database security has received considerable attention in recent years. In the database security category, access control is the selective restriction of access to the system or information only by the authorized user. However, access control is difficult to prevent information leakage by structured query language (SQL) statements created by internal attackers. In this paper, we propose a hybrid anomalous query access control system to extract the features of the access behavior by parsing the query log with the assumption that the DBA has role-based access control (RBAC) and to detect the database access anomalies in the features using the particle swarm optimization (PSO)-based CNN-LSTM network. The CNN hierarchy can extract important features for role classification in the vector of elements that have converted the SQL queries, and the LSTM model is suitable for representing the sequential relationship of SQL query statements. The PSO automatically finds the optimal CNN-LSTM hyperparameters for access control. Our CNN-LSTM method achieves nearly perfect access control performance for very similar roles that were previously difficult to classify and explains important variables that influence the role classification. Finally, the PSO-based CNN-LSTM networks outperform other state-of-the-art machine learning techniques in the TPC-E scenario-based virtual query dataset.